diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/itemmodels/qabstractitemmodel.h | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 31 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.h | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 2 | ||||
-rw-r--r-- | src/corelib/tools/qregexp.cpp | 7 | ||||
-rw-r--r-- | src/corelib/tools/qregexp.h | 3 |
7 files changed, 6 insertions, 49 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h index 4ea912c3f4..ff96fe53d6 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.h +++ b/src/corelib/itemmodels/qabstractitemmodel.h @@ -201,10 +201,8 @@ public: virtual Qt::DropActions supportedDragActions() const; #if QT_DEPRECATED_SINCE(5, 0) - void setSupportedDragActions(Qt::DropActions actions) - { - doSetSupportedDragActions(actions); - } + QT_DEPRECATED void setSupportedDragActions(Qt::DropActions actions) + { doSetSupportedDragActions(actions); } #endif virtual bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 58cccfa3b6..ae30167a42 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1774,7 +1774,7 @@ QString QCoreApplication::applicationFilePath() } # endif - QString argv0 = QFile::decodeName(QByteArray(argv()[0])); + QString argv0 = QFile::decodeName(arguments().at(0).toLocal8Bit()); QString absPath; if (!argv0.isEmpty() && argv0.at(0) == QLatin1Char('/')) { @@ -1822,35 +1822,6 @@ qint64 QCoreApplication::applicationPid() } /*! - \obsolete - - Use arguments().size() instead. -*/ -int QCoreApplication::argc() -{ - if (!self) { - qWarning("QCoreApplication::argc: Please instantiate the QApplication object first"); - return 0; - } - return self->d_func()->argc; -} - - -/*! - \obsolete - - Use arguments() instead. -*/ -char **QCoreApplication::argv() -{ - if (!self) { - qWarning("QCoreApplication::argv: Please instantiate the QApplication object first"); - return 0; - } - return self->d_func()->argv; -} - -/*! \since 4.1 Returns the list of command-line arguments. diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index 75120285a2..45583a67fa 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -87,10 +87,6 @@ public: ~QCoreApplication(); -#ifdef QT_DEPRECATED - QT_DEPRECATED static int argc(); - QT_DEPRECATED static char **argv(); -#endif static QStringList arguments(); static void setAttribute(Qt::ApplicationAttribute attribute, bool on = true); diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 93c8685482..5f43b52939 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -436,7 +436,7 @@ T qFindChild(const QObject *o, const QString &name = QString()); QList<T> qFindChildren(const QObject *oobj, const QString &name = QString()); QList<T> qFindChildren(const QObject *o, const QRegExp &re); #endif -#ifdef QT_DEPRECATED +#if QT_DEPRECATED_SINCE(5, 0) template<typename T> inline QT_DEPRECATED T qFindChild(const QObject *o, const QString &name = QString()) { return o->findChild<T>(name); } diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 240e167350..07ef4dc41e 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -502,7 +502,7 @@ template<> inline QVariant qvariant_cast<QVariant>(const QVariant &v) return v; } -#ifdef QT_DEPRECATED +#if QT_DEPRECATED_SINCE(5, 0) template<typename T> inline QT_DEPRECATED T qVariantValue(const QVariant &variant) { return qvariant_cast<T>(variant); } diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 77ea5bd852..70cae5ceee 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -4316,18 +4316,13 @@ int QRegExp::matchedLength() const #ifndef QT_NO_REGEXP_CAPTURE -#ifndef QT_NO_DEPRECATED /*! + \fn int QRegExp::numCaptures() const \obsolete Returns the number of captures contained in the regular expression. \sa captureCount() */ -int QRegExp::numCaptures() const -{ - return captureCount(); -} -#endif /*! \since 4.6 diff --git a/src/corelib/tools/qregexp.h b/src/corelib/tools/qregexp.h index 580629fbc4..0455e1603e 100644 --- a/src/corelib/tools/qregexp.h +++ b/src/corelib/tools/qregexp.h @@ -99,9 +99,6 @@ public: int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const; int matchedLength() const; #ifndef QT_NO_REGEXP_CAPTURE -#ifdef QT_DEPRECATED - QT_DEPRECATED int numCaptures() const; -#endif int captureCount() const; QStringList capturedTexts() const; QStringList capturedTexts(); |