diff options
27 files changed, 33 insertions, 209 deletions
diff --git a/doc/doc.pri b/doc/doc.pri index a460b3b3a..adf1bc56d 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -1,10 +1,6 @@ # Adapted from doc/doc.pri in Qt Creator. -greaterThan(QT_MAJOR_VERSION, 4) { - QDOC_BIN = $$[QT_INSTALL_BINS]/qdoc -} else { - QDOC_BIN = $$[QT_INSTALL_BINS]/qdoc3 -} +QDOC_BIN = $$[QT_INSTALL_BINS]/qdoc win32:QDOC_BIN = $$replace(QDOC_BIN, "/", "\\") IFW_VERSION_TAG = $$replace(IFW_VERSION, "[-.]", ) @@ -23,10 +19,7 @@ unix { # an unusual bug which causes qhelpgenerator.exe to do nothing HELPGENERATOR = cmd /C $$replace($$list($$[QT_INSTALL_BINS]/qhelpgenerator.exe), "/", "\\") } - -greaterThan(QT_MAJOR_VERSION, 4) { - HELPGENERATOR = $$HELPGENERATOR -platform minimal -} +HELPGENERATOR = $$HELPGENERATOR -platform minimal QHP_FILE = $$OUT_PWD/doc/html/ifw.qhp QCH_FILE = $$OUT_PWD/doc/ifw.qch diff --git a/installerfw.pri b/installerfw.pri index cc3cc1446..bde64c66f 100644 --- a/installerfw.pri +++ b/installerfw.pri @@ -92,23 +92,12 @@ macx:LIBS += -framework Carbon -framework Security } } -isEqual(QT_MAJOR_VERSION, 4) { - CONFIG += uitools - CONFIG(static, static|shared) { - QTPLUGIN += qico qtaccessiblewidgets - DEFINES += QT_STATIC - QT += script network xml - } -} else { - QT += uitools core-private - CONFIG(static, static|shared) { - QTPLUGIN += qico qtaccessiblewidgets - QT += concurrent network script xml - } - CONFIG += no_private_qt_headers_warning +QT += uitools core-private +CONFIG(static, static|shared) { + QTPLUGIN += qico qtaccessiblewidgets + QT += concurrent network script xml } - -CONFIG += depend_includepath +CONFIG += depend_includepath no_private_qt_headers_warning GIT_SHA1 = $$system(git rev-list --abbrev-commit -n1 HEAD) DEFINES += QT_NO_CAST_FROM_ASCII "_GIT_SHA1_=$$GIT_SHA1" IFW_VERSION=$$IFW_VERSION diff --git a/no_app_bundle.pri b/no_app_bundle.pri index 631317193..d60b04b03 100644 --- a/no_app_bundle.pri +++ b/no_app_bundle.pri @@ -4,25 +4,3 @@ NO_APP_BUNDLE_PRI_INCLUDED = 1 equals(TEMPLATE, app):CONFIG -= app_bundle - -isEqual(QT_MAJOR_VERSION, 4):static:contains(QT, gui) { - isEmpty(DESTDIR) { - MY_DEST_DIR=$$OUT_PWD - } else { - MY_DEST_DIR=$$DESTDIR - } - - !exists($$(MY_DEST_DIR)/qt_menu.nib) { - # try to get the qt_menu.nib path from the environment variable - isEmpty(QT_MENU_NIB_DIR): QT_MENU_NIB_DIR = $$(QT_MENU_NIB_DIR) - - # everything which has not the IFW_APP_PATH as target can try to copy it from there - exists($$IFW_APP_PATH/qt_menu.nib):QT_MENU_NIB_DIR=$$IFW_APP_PATH/qt_menu.nib - - isEmpty(QT_MENU_NIB_DIR) { - warning(Please call qmake with QT_MENU_NIB_DIR=<YOUR_QT_SRC_DIR>/src/gui/mac/qt_menu.nib) - } else { - system($$QMAKE_COPY -r $$quote($$QT_MENU_NIB_DIR) $$quote($$MY_DEST_DIR)) - } - } -} diff --git a/src/libs/installer/abstractfiletask.h b/src/libs/installer/abstractfiletask.h index 858a35f40..1a57dff69 100644 --- a/src/libs/installer/abstractfiletask.h +++ b/src/libs/installer/abstractfiletask.h @@ -48,12 +48,6 @@ #include <QObject> #include <QReadWriteLock> -#if QT_VERSION < 0x050000 -#include <qtconcurrentexception.h> -#define QException QtConcurrent::Exception -#define QUnhandledException QtConcurrent::UnhandledException -#endif - namespace QInstaller { namespace TaskRole { diff --git a/src/libs/installer/binaryformatenginehandler.h b/src/libs/installer/binaryformatenginehandler.h index 107f834f4..155d9a588 100644 --- a/src/libs/installer/binaryformatenginehandler.h +++ b/src/libs/installer/binaryformatenginehandler.h @@ -44,11 +44,7 @@ #include "installer_global.h" -#if QT_VERSION < 0x050000 -# include <QtCore/QAbstractFileEngineHandler> -#else -# include <QtCore/private/qabstractfileengine_p.h> -#endif +#include <QtCore/private/qabstractfileengine_p.h> namespace QInstallerCreator { diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index 91b22563c..a1550b47c 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -547,13 +547,8 @@ void Component::loadTranslations(const QDir &directory, const QStringList &qms) */ void Component::loadUserInterfaces(const QDir &directory, const QStringList &uis) { -#if QT_VERSION < 0x050000 - if (QApplication::type() == QApplication::Tty) - return; -#else if (qobject_cast<QApplication*> (qApp) == 0) return; -#endif QDirIterator it(directory.path(), uis, QDir::Files); while (it.hasNext()) { @@ -569,11 +564,7 @@ void Component::loadUserInterfaces(const QDir &directory, const QStringList &uis QWidget *const widget = loader.load(&file, 0); if (!widget) { throw Error(tr("Could not load the requested UI file '%1'. Error: %2").arg(it.fileName(), -#if QT_VERSION < 0x050000 - tr("An error has occurred while reading the UI file."))); -#else loader.errorString())); -#endif } d->m_userInterfaces.insert(widget->objectName(), widget); } diff --git a/src/libs/installer/component_p.cpp b/src/libs/installer/component_p.cpp index ae4a149a5..7c7ec30d6 100644 --- a/src/libs/installer/component_p.cpp +++ b/src/libs/installer/component_p.cpp @@ -42,16 +42,9 @@ #include "component_p.h" #include "component.h" -#include "messageboxhandler.h" #include "packagemanagercore.h" -#include <QApplication> - -#if QT_VERSION < 0x050000 -# include <QDesktopServices> -#else -# include <QStandardPaths> -#endif +#include <QWidget> namespace QInstaller { diff --git a/src/libs/installer/component_p.h b/src/libs/installer/component_p.h index 821e891d7..98d3cf2f4 100644 --- a/src/libs/installer/component_p.h +++ b/src/libs/installer/component_p.h @@ -44,10 +44,10 @@ #include "qinstallerglobal.h" -#include <QtCore/QPointer> -#include <QtCore/QStringList> -#include <QtCore/QUrl> +#include <QPointer> #include <QScriptValue> +#include <QStringList> +#include <QUrl> namespace QInstaller { diff --git a/src/libs/installer/downloadfiletask.cpp b/src/libs/installer/downloadfiletask.cpp index 8d15a835d..0e29aebe6 100644 --- a/src/libs/installer/downloadfiletask.cpp +++ b/src/libs/installer/downloadfiletask.cpp @@ -239,7 +239,7 @@ void Downloader::onError(QNetworkReply::NetworkError error) void Downloader::onSslErrors(const QList<QSslError> &sslErrors) { -#if defined(QT_NO_SSL) || defined(QT_NO_OPENSSL) +#ifdef QT_NO_SSL Q_UNUSED(sslErrors); #else foreach (const QSslError &error, sslErrors) @@ -320,8 +320,7 @@ QNetworkReply *Downloader::startDownload(const FileTaskItem &item) connect(reply, SIGNAL(readyRead()), this, SLOT(onReadyRead())); connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onError(QNetworkReply::NetworkError))); -#ifndef QT_NO_OPENSSL - // TODO: once we switch to Qt5, use QT_NO_SSL instead of QT_NO_OPENSSL +#ifndef QT_NO_SSL connect(reply, SIGNAL(sslErrors(QList<QSslError>)), SLOT(onSslErrors(QList<QSslError>))); #endif connect(reply, SIGNAL(downloadProgress(qint64, qint64)), this, SLOT(onDownloadProgress(qint64, diff --git a/src/libs/installer/fsengineclient.h b/src/libs/installer/fsengineclient.h index e74fb5be0..779731af4 100644 --- a/src/libs/installer/fsengineclient.h +++ b/src/libs/installer/fsengineclient.h @@ -45,12 +45,7 @@ #include "installer_global.h" #include <QtNetwork/QHostAddress> - -#if QT_VERSION < 0x050000 -# include <QtCore/QAbstractFileEngineHandler> -#else -# include <QtCore/private/qabstractfileengine_p.h> -#endif +#include <QtCore/private/qabstractfileengine_p.h> QT_BEGIN_NAMESPACE class QTcpSocket; diff --git a/src/libs/installer/fsengineserver.cpp b/src/libs/installer/fsengineserver.cpp index 669ed4248..59a9621d7 100644 --- a/src/libs/installer/fsengineserver.cpp +++ b/src/libs/installer/fsengineserver.cpp @@ -50,11 +50,7 @@ #include <QtNetwork/QTcpSocket> -#if QT_VERSION < 0x050000 -# include <QtCore/QFSFileEngine> -#else -# include <QtCore/private/qfsfileengine_p.h> -#endif +#include <QtCore/private/qfsfileengine_p.h> typedef int descriptor_t; diff --git a/src/libs/installer/init.cpp b/src/libs/installer/init.cpp index eedae80bd..f55b22b94 100644 --- a/src/libs/installer/init.cpp +++ b/src/libs/installer/init.cpp @@ -140,13 +140,6 @@ static void initResources() { Q_INIT_RESOURCE(patch_file_lists); Q_INIT_RESOURCE(installer); - // Qt5 or better qmake generates that automatically, so this is only needed on Qt4 -# if QT_VERSION < 0x050000 - Q_IMPORT_PLUGIN(qico) - Q_UNUSED(qt_plugin_instance_qico()); - Q_IMPORT_PLUGIN(qtaccessiblewidgets) - Q_UNUSED(qt_plugin_instance_qtaccessiblewidgets()); -# endif } #endif @@ -181,11 +174,6 @@ static QByteArray trimAndPrepend(QtMsgType type, const QByteArray &msg) return ba; } -#if QT_VERSION < 0x050000 -static void messageHandler(QtMsgType type, const char *msg) -{ - const QByteArray ba = trimAndPrepend(type, msg); -#else void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { // suppress warning from QPA minimal plugin @@ -197,22 +185,15 @@ void messageHandler(QtMsgType type, const QMessageLogContext &context, const QSt QString::fromLatin1(context.file)).arg(context.line).arg( QString::fromLatin1(context.function)).toLocal8Bit(); } -#endif verbose() << ba.constData() << std::endl; if (!isVerbose() && type != QtDebugMsg) std::cout << ba.constData() << std::endl << std::endl; if (type == QtFatalMsg) { -#if QT_VERSION < 0x050000 - QtMsgHandler oldMsgHandler = qInstallMsgHandler(0); - qt_message_output(type, msg); - qInstallMsgHandler(oldMsgHandler); -#else QtMessageHandler oldMsgHandler = qInstallMessageHandler(0); qt_message_output(type, context, msg); qInstallMessageHandler(oldMsgHandler); -#endif } } @@ -256,11 +237,5 @@ void QInstaller::init() #ifdef Q_OS_MAC factory.registerUpdateOperation<MacReplaceInstallNamesOperation>(QLatin1String("ReplaceInstallNames")); #endif // Q_OS_MAC - - // qDebug -> verbose() -#if QT_VERSION < 0x050000 - qInstallMsgHandler(messageHandler); -#else qInstallMessageHandler(messageHandler); -#endif } diff --git a/src/libs/installer/installer.pro b/src/libs/installer/installer.pro index 837196c5f..ac55883b2 100644 --- a/src/libs/installer/installer.pro +++ b/src/libs/installer/installer.pro @@ -31,11 +31,10 @@ DEFINES += BUILD_LIB_INSTALLER QT += \ script \ network \ - xml - -isEqual(QT_MAJOR_VERSION, 5) { - QT += concurrent widgets core-private -} + xml \ + concurrent \ + widgets \ + core-private HEADERS += packagemanagercore.h \ packagemanagercore_p.h \ diff --git a/src/libs/installer/messageboxhandler.cpp b/src/libs/installer/messageboxhandler.cpp index 69fc62570..09aa43c1d 100644 --- a/src/libs/installer/messageboxhandler.cpp +++ b/src/libs/installer/messageboxhandler.cpp @@ -151,13 +151,8 @@ MessageBoxHandler *MessageBoxHandler::instance() QWidget *MessageBoxHandler::currentBestSuitParent() { -#if QT_VERSION < 0x050000 - if (QApplication::type() == QApplication::Tty) - return 0; -#else if (qobject_cast<QApplication*> (qApp) == 0) return 0; -#endif if (qApp->activeModalWidget()) return qApp->activeModalWidget(); @@ -319,13 +314,8 @@ QMessageBox::StandardButton MessageBoxHandler::showMessageBox(MessageType messag qDebug() << QString::fromLatin1("created %1 message box %2: '%3', %4").arg(messageTypeHash .value(messageType),identifier, title, text); -#if QT_VERSION < 0x050000 - if (QApplication::type() == QApplication::Tty) - return defaultButton; -#else if (qobject_cast<QApplication*> (qApp) == 0) return defaultButton; -#endif if (m_automaticAnswers.contains(identifier)) return m_automaticAnswers.value(identifier); diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 61ce92467..139296bdb 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -77,9 +77,7 @@ # include "qt_windows.h" #endif -#if QT_VERSION >= 0x050000 -# include <QStandardPaths> -#endif +#include <QStandardPaths> /*! \qmltype QInstaller diff --git a/src/libs/installer/packagemanagercoredata.cpp b/src/libs/installer/packagemanagercoredata.cpp index f24a76d87..a0eafdf79 100644 --- a/src/libs/installer/packagemanagercoredata.cpp +++ b/src/libs/installer/packagemanagercoredata.cpp @@ -76,11 +76,7 @@ PackageManagerCoreData::PackageManagerCoreData(const QHash<QString, QString> &va SHGetFolderPath(0, CSIDL_PROGRAM_FILES, 0, 0, buffer); dir = QString::fromWCharArray(buffer); #elif defined (Q_OS_MAC) -# if QT_VERSION < 0x050000 - dir = QDesktopServices::storageLocation(QDesktopServices::ApplicationsLocation); -# else dir = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation).value(0); -# endif #endif m_variables.insert(QLatin1String("ApplicationsDir"), dir); diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index 9908ce29d..e131390b3 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -116,15 +116,9 @@ QScriptValue qDesktopServicesDisplayName(QScriptContext *context, QScriptEngine if (check.isError()) return check; -#if QT_VERSION < 0x050000 - const QDesktopServices::StandardLocation location = - static_cast< QDesktopServices::StandardLocation >(context->argument(0).toInt32()); - return QDesktopServices::displayName(location); -#else const QStandardPaths::StandardLocation location = static_cast< QStandardPaths::StandardLocation >(context->argument(0).toInt32()); return QStandardPaths::displayName(location); -#endif } QScriptValue qDesktopServicesStorageLocation(QScriptContext *context, QScriptEngine *engine) @@ -134,15 +128,9 @@ QScriptValue qDesktopServicesStorageLocation(QScriptContext *context, QScriptEng if (check.isError()) return check; -#if QT_VERSION < 0x050000 - const QDesktopServices::StandardLocation location = - static_cast< QDesktopServices::StandardLocation >(context->argument(0).toInt32()); - return QDesktopServices::storageLocation(location); -#else const QStandardPaths::StandardLocation location = static_cast< QStandardPaths::StandardLocation >(context->argument(0).toInt32()); return QStandardPaths::writableLocation(location); -#endif } QScriptValue qFileDialogGetExistingDirectory(QScriptContext *context, QScriptEngine *engine) @@ -359,20 +347,6 @@ QScriptValue ScriptEngine::generateMessageBoxObject() QScriptValue ScriptEngine::generateDesktopServicesObject() { QScriptValue desktopServices = newArray(); -#if QT_VERSION < 0x050000 - desktopServices.setProperty(QLatin1String("DesktopLocation"), QDesktopServices::DesktopLocation); - desktopServices.setProperty(QLatin1String("DesktopLocation"), QDesktopServices::DesktopLocation); - desktopServices.setProperty(QLatin1String("DocumentsLocation"), QDesktopServices::DocumentsLocation); - desktopServices.setProperty(QLatin1String("FontsLocation"), QDesktopServices::FontsLocation); - desktopServices.setProperty(QLatin1String("ApplicationsLocation"), QDesktopServices::ApplicationsLocation); - desktopServices.setProperty(QLatin1String("MusicLocation"), QDesktopServices::MusicLocation); - desktopServices.setProperty(QLatin1String("MoviesLocation"), QDesktopServices::MoviesLocation); - desktopServices.setProperty(QLatin1String("PicturesLocation"), QDesktopServices::PicturesLocation); - desktopServices.setProperty(QLatin1String("TempLocation"), QDesktopServices::TempLocation); - desktopServices.setProperty(QLatin1String("HomeLocation"), QDesktopServices::HomeLocation); - desktopServices.setProperty(QLatin1String("DataLocation"), QDesktopServices::DataLocation); - desktopServices.setProperty(QLatin1String("CacheLocation"), QDesktopServices::CacheLocation); -#else desktopServices.setProperty(QLatin1String("DesktopLocation"), QStandardPaths::DesktopLocation); desktopServices.setProperty(QLatin1String("DesktopLocation"), QStandardPaths::DesktopLocation); desktopServices.setProperty(QLatin1String("DocumentsLocation"), QStandardPaths::DocumentsLocation); @@ -385,7 +359,6 @@ QScriptValue ScriptEngine::generateDesktopServicesObject() desktopServices.setProperty(QLatin1String("HomeLocation"), QStandardPaths::HomeLocation); desktopServices.setProperty(QLatin1String("DataLocation"), QStandardPaths::DataLocation); desktopServices.setProperty(QLatin1String("CacheLocation"), QStandardPaths::CacheLocation); -#endif desktopServices.setProperty(QLatin1String("openUrl"), newFunction(qDesktopServicesOpenUrl)); diff --git a/src/libs/installer/settings.h b/src/libs/installer/settings.h index 9bce8bd70..5788ddb9b 100644 --- a/src/libs/installer/settings.h +++ b/src/libs/installer/settings.h @@ -52,10 +52,6 @@ #include <QtNetwork/QNetworkProxy> -#if QT_VERSION < 0x050000 - Q_DECLARE_METATYPE(QNetworkProxy) -#endif - namespace QInstaller { class Repository; diff --git a/src/libs/kdtools/kdupdaterfiledownloader.cpp b/src/libs/kdtools/kdupdaterfiledownloader.cpp index f2063c8c4..96baf88b3 100644 --- a/src/libs/kdtools/kdupdaterfiledownloader.cpp +++ b/src/libs/kdtools/kdupdaterfiledownloader.cpp @@ -823,8 +823,7 @@ KDUpdater::HttpDownloader::HttpDownloader(QObject *parent) : KDUpdater::FileDownloader(QLatin1String("http"), parent) , d(new Private(this)) { -#ifndef QT_NO_OPENSSL - // TODO: once we switch to Qt5, use QT_NO_SSL instead of QT_NO_OPENSSL +#ifndef QT_NO_SSL connect(&d->manager, SIGNAL(sslErrors(QNetworkReply*, QList<QSslError>)), this, SLOT(onSslErrors(QNetworkReply*, QList<QSslError>))); #endif @@ -1067,11 +1066,10 @@ void KDUpdater::HttpDownloader::onAuthenticationRequired(QNetworkReply *reply, Q } } -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL #include "messageboxhandler.h" -// TODO: once we switch to Qt5, use QT_NO_SSL instead of QT_NO_OPENSSL void KDUpdater::HttpDownloader::onSslErrors(QNetworkReply* reply, const QList<QSslError> &errors) { Q_UNUSED(reply) diff --git a/src/libs/kdtools/kdupdaterfiledownloader_p.h b/src/libs/kdtools/kdupdaterfiledownloader_p.h index c5019cae6..f5612f6ba 100644 --- a/src/libs/kdtools/kdupdaterfiledownloader_p.h +++ b/src/libs/kdtools/kdupdaterfiledownloader_p.h @@ -141,8 +141,7 @@ private Q_SLOTS: void httpDone(bool error); void httpReqFinished(); void onAuthenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator); -#ifndef QT_NO_OPENSSL - // TODO: once we switch to Qt5, use QT_NO_SSL instead of QT_NO_OPENSSL +#ifndef QT_NO_SSL void onSslErrors(QNetworkReply* reply, const QList<QSslError> &errors); #endif private: diff --git a/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp b/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp index 92dff42ee..cd6b552a5 100644 --- a/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp +++ b/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp @@ -77,8 +77,7 @@ FileDownloaderFactory::FileDownloaderFactory() registerFileDownloader<HttpDownloader>(QLatin1String("http")); registerFileDownloader<ResourceFileDownloader >(QLatin1String("resource")); -#ifndef QT_NO_OPENSSL - // TODO: once we switch to Qt5, use QT_NO_SSL instead of QT_NO_OPENSSL +#ifndef QT_NO_SSL if (QSslSocket::supportsSsl()) registerFileDownloader<HttpDownloader>(QLatin1String("https")); else diff --git a/src/sdk/sdk.pro b/src/sdk/sdk.pro index e75fbe3c2..3cbc0347e 100644 --- a/src/sdk/sdk.pro +++ b/src/sdk/sdk.pro @@ -4,16 +4,12 @@ TARGET = installerbase include(../../installerfw.pri) -QT += network script xml - -isEqual(QT_MAJOR_VERSION, 5) { - QT += widgets - # add the minimal plugin in static case to be able to start the installer - # headless with: installer-binary -platform minimal - # using QT += qpa_minimal_plugin would result in a minimal only compiled version - !win32:CONFIG(static, static|shared) { +QT += network script xml widgets +# add the minimal plugin in static build to be able to start the installer headless with: +# installer-binary -platform minimal +# using QT += qpa_minimal_plugin would result in a minimal only compiled version +!win32:CONFIG(static, static|shared) { QTPLUGIN += qminimal - } } DESTDIR = $$IFW_APP_PATH diff --git a/src/sdk/settingsdialog.cpp b/src/sdk/settingsdialog.cpp index 305fc051a..8bbddfe3b 100644 --- a/src/sdk/settingsdialog.cpp +++ b/src/sdk/settingsdialog.cpp @@ -428,13 +428,8 @@ void SettingsDialog::setupRepositoriesTreeWidget() for (int i = 0; i < treeWidget->model()->columnCount(); ++i) treeWidget->resizeColumnToContents(i); -#if QT_VERSION < 0x050000 - treeWidget->header()->setResizeMode(0, QHeaderView::Fixed); - treeWidget->header()->setResizeMode(1, QHeaderView::Fixed); -#else treeWidget->header()->setSectionResizeMode(0, QHeaderView::Fixed); treeWidget->header()->setSectionResizeMode(1, QHeaderView::Fixed); -#endif treeWidget->header()->setMinimumSectionSize(treeWidget->columnWidth(1)); treeWidget->setItemDelegateForColumn(0, new PasswordDelegate(treeWidget)); diff --git a/tests/auto/installer/messageboxhandler/messageboxhandler.pro b/tests/auto/installer/messageboxhandler/messageboxhandler.pro index c0c1364d8..619668315 100644 --- a/tests/auto/installer/messageboxhandler/messageboxhandler.pro +++ b/tests/auto/installer/messageboxhandler/messageboxhandler.pro @@ -1,6 +1,5 @@ include(../../qttest.pri) -QT += script -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +QT += script widgets SOURCES += tst_messageboxhandler.cpp diff --git a/tests/auto/installer/packagemanagercore/packagemanagercore.pro b/tests/auto/installer/packagemanagercore/packagemanagercore.pro index c78393540..34c3bd6ac 100644 --- a/tests/auto/installer/packagemanagercore/packagemanagercore.pro +++ b/tests/auto/installer/packagemanagercore/packagemanagercore.pro @@ -1,9 +1,7 @@ include(../../qttest.pri) QT += script -lessThan(QT_MAJOR_VERSION, 5) { - QT -= gui -} + SOURCES += tst_packagemanagercore.cpp RESOURCES += \ diff --git a/tests/auto/installer/scriptengine/scriptengine.pro b/tests/auto/installer/scriptengine/scriptengine.pro index a7b2bd157..72bb7028e 100644 --- a/tests/auto/installer/scriptengine/scriptengine.pro +++ b/tests/auto/installer/scriptengine/scriptengine.pro @@ -1,9 +1,6 @@ include(../../qttest.pri) -QT += script -greaterThan(QT_MAJOR_VERSION, 4) { - QT += widgets -} +QT += script widgets SOURCES += tst_scriptengine.cpp diff --git a/tools/binarycreator/rcc/rcc.cpp b/tools/binarycreator/rcc/rcc.cpp index 2750986ed..b79e97493 100644 --- a/tools/binarycreator/rcc/rcc.cpp +++ b/tools/binarycreator/rcc/rcc.cpp @@ -297,11 +297,7 @@ qint64 RCCFileInfo::writeDataName(RCCResourceLibrary &lib, qint64 offset) offset += 2; // write the hash -#if QT_VERSION < 0x050000 - lib.writeNumber4(qHash(m_name)); -#else lib.writeNumber4(qt_hash(m_name)); -#endif if (text) lib.writeString("\n "); offset += 4; @@ -887,11 +883,7 @@ bool RCCResourceLibrary::writeDataNames() static bool qt_rcc_compare_hash(const RCCFileInfo *left, const RCCFileInfo *right) { -#if QT_VERSION < 0x050000 - return qHash(left->m_name) < qHash(right->m_name); -#else return qt_hash(left->m_name) < qt_hash(right->m_name); -#endif } bool RCCResourceLibrary::writeDataStructure() |