55
55
56
56
#if defined(QT_STATICPLUGIN)
57
57
#include < QtPlugin>
58
- #if QT_VERSION < 0x050000
59
- Q_IMPORT_PLUGIN (qcncodecs)
60
- Q_IMPORT_PLUGIN(qjpcodecs)
61
- Q_IMPORT_PLUGIN(qtwcodecs)
62
- Q_IMPORT_PLUGIN(qkrcodecs)
63
- Q_IMPORT_PLUGIN(qtaccessiblewidgets)
64
- #else
65
58
#if QT_VERSION < 0x050400
66
59
Q_IMPORT_PLUGIN (AccessibleFactory)
67
60
#endif
@@ -73,11 +66,6 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
73
66
Q_IMPORT_PLUGIN (QCocoaIntegrationPlugin);
74
67
#endif
75
68
#endif
76
- #endif
77
-
78
- #if QT_VERSION < 0x050000
79
- #include < QTextCodec>
80
- #endif
81
69
82
70
// Declare meta types used for QMetaObject::invokeMethod
83
71
Q_DECLARE_METATYPE (bool *)
@@ -151,16 +139,6 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
151
139
}
152
140
153
141
/* qDebug() message handler --> debug.log */
154
- #if QT_VERSION < 0x050000
155
- void DebugMessageHandler (QtMsgType type, const char *msg)
156
- {
157
- if (type == QtDebugMsg) {
158
- LogPrint (BCLog::QT, " GUI: %s\n " , msg);
159
- } else {
160
- LogPrintf (" GUI: %s\n " , msg);
161
- }
162
- }
163
- #else
164
142
void DebugMessageHandler (QtMsgType type, const QMessageLogContext& context, const QString &msg)
165
143
{
166
144
Q_UNUSED (context);
@@ -170,7 +148,6 @@ void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons
170
148
LogPrintf (" GUI: %s\n " , msg.toStdString ());
171
149
}
172
150
}
173
- #endif
174
151
175
152
/* * Class encapsulating Bitcoin Core startup and shutdown.
176
153
* Allows running startup and shutdown in a different thread from the UI thread.
@@ -572,12 +549,6 @@ int main(int argc, char *argv[])
572
549
// Do not refer to data directory yet, this can be overridden by Intro::pickDataDirectory
573
550
574
551
// / 1. Basic Qt initialization (not dependent on parameters or configuration)
575
- #if QT_VERSION < 0x050000
576
- // Internal string conversion is all UTF-8
577
- QTextCodec::setCodecForTr (QTextCodec::codecForName (" UTF-8" ));
578
- QTextCodec::setCodecForCStrings (QTextCodec::codecForTr ());
579
- #endif
580
-
581
552
Q_INIT_RESOURCE (bitcoin);
582
553
Q_INIT_RESOURCE (bitcoin_locale);
583
554
@@ -708,17 +679,12 @@ int main(int argc, char *argv[])
708
679
// / 9. Main GUI initialization
709
680
// Install global event filter that makes sure that long tooltips can be word-wrapped
710
681
app.installEventFilter (new GUIUtil::ToolTipToRichTextFilter (TOOLTIP_WRAP_THRESHOLD, &app));
711
- #if QT_VERSION < 0x050000
712
- // Install qDebug() message handler to route to debug.log
713
- qInstallMsgHandler (DebugMessageHandler);
714
- #else
715
682
#if defined(Q_OS_WIN)
716
683
// Install global event filter for processing Windows session related Windows messages (WM_QUERYENDSESSION and WM_ENDSESSION)
717
684
qApp->installNativeEventFilter (new WinShutdownMonitor ());
718
685
#endif
719
686
// Install qDebug() message handler to route to debug.log
720
687
qInstallMessageHandler (DebugMessageHandler);
721
- #endif
722
688
// Allow parameter interaction before we create the options model
723
689
app.parameterSetup ();
724
690
// Load GUI settings from QSettings
@@ -739,7 +705,7 @@ int main(int argc, char *argv[])
739
705
// so the GUI thread won't be held up.
740
706
if (node->baseInitialize ()) {
741
707
app.requestInitialize ();
742
- #if defined(Q_OS_WIN) && QT_VERSION >= 0x050000
708
+ #if defined(Q_OS_WIN)
743
709
WinShutdownMonitor::registerShutdownBlockReason (QObject::tr (" %1 didn't yet exit safely..." ).arg (QObject::tr (PACKAGE_NAME)), (HWND)app.getMainWinId ());
744
710
#endif
745
711
app.exec ();
0 commit comments