summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/init.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-06-02 09:46:41 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-06-02 09:57:13 +0200
commite89721bce16d6486e47b5b88d24467face5a11aa (patch)
tree268bad4a296f3dd02c83d1735fd7b76be38623d8 /src/libs/installer/init.cpp
parentd5b02dd37312ee9a9682caff9fae925c04323e8f (diff)
Cleanup to support Qt5 only.
Change-Id: Ib8f61229ce2f07e52c22a15e10dc817aca860ead Reviewed-by: Niels Weber <niels.weber@digia.com>
Diffstat (limited to 'src/libs/installer/init.cpp')
-rw-r--r--src/libs/installer/init.cpp25
1 files changed, 0 insertions, 25 deletions
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
}