Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt: Remove stray QT4 references #2220

Merged
merged 1 commit into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/gridcoinresearch.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.\" Contact richard.leckinger@riseup.net to correct errors or typos.
.TH man 1 "25 September 2016" "1.0" "gridcoinresearch man page"
.SH NAME
gridcoinresearch \- graphical (qt4) gridcoin wallet
gridcoinresearch \- graphical (qt5) gridcoin wallet
.SH SYNOPSIS
gridcoinresearch
.SH DESCRIPTION
Expand Down
20 changes: 2 additions & 18 deletions src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,6 @@ static std::string Translate(const char* psz)
}

/* qDebug() message handler --> debug.log */
#if QT_VERSION < 0x050000
void DebugMessageHandler(QtMsgType type, const char *msg)
{
if (type == QtDebugMsg) {
LogPrint(BCLog::LogFlags::QT, "GUI: %s\n", msg);
} else {
LogPrintf("GUI: %s\n", msg);
}
}
#else
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
{
Q_UNUSED(context);
Expand All @@ -239,7 +229,6 @@ void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons
LogPrintf("GUI: %s\n", msg.toStdString());
}
}
#endif

/* Handle runaway exceptions. Shows a message box with the problem and quits the program.
*/
Expand Down Expand Up @@ -339,7 +328,7 @@ int main(int argc, char *argv[])
// Install global event filter that suppresses help context question mark
app.installEventFilter(new GUIUtil::WindowContextHelpButtonHintFilter(&app));

#if defined(WIN32) && QT_VERSION >= 0x050000
#if defined(WIN32)
// Install global event filter for processing Windows session related Windows messages (WM_QUERYENDSESSION and WM_ENDSESSION)
app.installNativeEventFilter(new WinShutdownMonitor());
#endif
Expand Down Expand Up @@ -573,13 +562,8 @@ int StartGridcoinQt(int argc, char *argv[], QApplication& app, OptionsModel& opt

std::shared_ptr<ThreadHandler> threads = std::make_shared<ThreadHandler>();

#if QT_VERSION < 0x050000
// Install qDebug() message handler to route to debug.log
qInstallMsgHandler(DebugMessageHandler);
#else
// Install qDebug() message handler to route to debug.log
qInstallMessageHandler(DebugMessageHandler);
#endif

// Subscribe to global signals from core
uiInterface.ThreadSafeMessageBox.connect(ThreadSafeMessageBox);
Expand Down Expand Up @@ -669,7 +653,7 @@ int StartGridcoinQt(int argc, char *argv[], QApplication& app, OptionsModel& opt
// Place this here as guiref has to be defined if we don't want to lose URIs
ipcInit(argc, argv);

#if defined(WIN32) && defined(QT_GUI) && QT_VERSION >= 0x050000
#if defined(WIN32) && defined(QT_GUI)
WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("%1 didn't yet exit safely...").arg(QObject::tr(PACKAGE_NAME)), (HWND)window.winId());
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Qt4 bitcoin GUI.
* Qt5 bitcoin GUI.
*
* W.J. van der Laan 2011-2012
* The Bitcoin Developers 2011-2012
Expand Down
7 changes: 0 additions & 7 deletions src/qt/test/test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

#if defined(QT_STATICPLUGIN)
#include <QtPlugin>
#if QT_VERSION < 0x050000
Q_IMPORT_PLUGIN(qcncodecs)
Q_IMPORT_PLUGIN(qjpcodecs)
Q_IMPORT_PLUGIN(qtwcodecs)
Q_IMPORT_PLUGIN(qkrcodecs)
#else
#if defined(QT_QPA_PLATFORM_MINIMAL)
Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin);
#endif
Expand All @@ -22,7 +16,6 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
#endif
#endif
#endif


// This is all you need to run all the tests
Expand Down
2 changes: 1 addition & 1 deletion src/qt/winshutdownmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <qt/winshutdownmonitor.h>

#if defined(WIN32) && QT_VERSION >= 0x050000
#if defined(WIN32)
#include <init.h>
#include <util.h>

Expand Down
2 changes: 0 additions & 2 deletions src/qt/winshutdownmonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <QByteArray>
#include <QString>

#if QT_VERSION >= 0x050000
#include <windef.h> // for HWND

#include <QAbstractNativeEventFilter>
Expand All @@ -24,6 +23,5 @@ class WinShutdownMonitor : public QAbstractNativeEventFilter
static void registerShutdownBlockReason(const QString& strReason, const HWND& mainWinId);
};
#endif
#endif

#endif // BITCOIN_QT_WINSHUTDOWNMONITOR_H