aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-01-11 09:14:06 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-11 09:15:03 +0100
commit6a0e2376a14c77585888373099109d51a08bd74f (patch)
treee4ac226f869351d475be7d1f26d005d0db3c42f7 /src/qt
parent62e9d774966c9f4344f0356c59ddadcc5ff17212 (diff)
parent42cc96737ca05a3b539ce5d1a734a7a62407d31c (diff)
Merge pull request #3346
42cc967 qt5: fix typo causing broken selection logic (Cory Fields) 371f3f6 qt5: fix --with-qt with no arguments (Cory Fields) 2691cbc qt5: Force macports default include path to be searched last (Cory Fields) 8b0f608 qt5: tests: Make sure static plugin symbols are pulled in (Cory Fields) 47ffb50 qt5: Use QT_SELECT for debian-based distros. (Cory Fields) 60dc589 qt5: Use the info gleaned from configure for plugin importing (Cory Fields) c8ba8ef qt5: split out qt config and add qt5 support (Cory Fields) c614bd7 qt5: fix a build issue with osx and qtdbus (Cory Fields) 328bdb1 qt5: Ensure correct link order (Cory Fields)
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/Makefile.am4
-rw-r--r--src/qt/bitcoin.cpp18
-rw-r--r--src/qt/notificator.cpp16
-rw-r--r--src/qt/test/Makefile.am2
-rw-r--r--src/qt/test/test_main.cpp9
5 files changed, 31 insertions, 18 deletions
diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
index 863274e80c..abd8a9f118 100644
--- a/src/qt/Makefile.am
+++ b/src/qt/Makefile.am
@@ -220,10 +220,10 @@ bitcoinstrings.cpp: FORCE
translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
- @$(LUPDATE) $^ -locations relative -no-obsolete -ts locale/bitcoin_en.ts
+ @QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts locale/bitcoin_en.ts
$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
- @cd $(abs_srcdir); test -f $(RCC) && $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \
+ @cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \
echo error: could not build $@
$(SED) -i.bak -e '/^\*\*.*Created:/d' $@ && rm $@.bak
$(SED) -i.bak -e '/^\*\*.*by:/d' $@ && rm $@.bak
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index d78f6fab75..794d12f69b 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -2,6 +2,7 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include "bitcoin-config.h"
#include "bitcoingui.h"
#include "clientmodel.h"
@@ -30,19 +31,22 @@
#include <QTimer>
#include <QTranslator>
-#if QT_VERSION < 0x050000
-#include <QTextCodec>
-#endif
-
-#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED)
-#define _BITCOIN_QT_PLUGINS_INCLUDED
-#define __INSURE__
+#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)
Q_IMPORT_PLUGIN(qtaccessiblewidgets)
+#else
+Q_IMPORT_PLUGIN(AccessibleFactory)
+Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
+#endif
+#endif
+
+#if QT_VERSION < 0x050000
+#include <QTextCodec>
#endif
// Declare meta types used for QMetaObject::invokeMethod
diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp
index 1cef397d12..38a029dbe5 100644
--- a/src/qt/notificator.cpp
+++ b/src/qt/notificator.cpp
@@ -14,18 +14,18 @@
#include <QSystemTrayIcon>
#include <QTemporaryFile>
#include <QVariant>
-
-#ifdef Q_OS_MAC
-#include "macnotificationhandler.h"
-
-#include <ApplicationServices/ApplicationServices.h>
-#endif
-
#ifdef USE_DBUS
#include <stdint.h>
-
#include <QtDBus>
#endif
+// Include ApplicationServices.h after QtDbus to avoid redefinition of check().
+// This affects at least OSX 10.6. See /usr/include/AssertMacros.h for details.
+// Note: This could also be worked around using:
+// #define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#ifdef Q_OS_MAC
+#include <ApplicationServices/ApplicationServices.h>
+#include "macnotificationhandler.h"
+#endif
// https://wiki.ubuntu.com/NotificationDevelopmentGuidelines recommends at least 128
diff --git a/src/qt/test/Makefile.am b/src/qt/test/Makefile.am
index cb6874700e..0150524337 100644
--- a/src/qt/test/Makefile.am
+++ b/src/qt/test/Makefile.am
@@ -18,7 +18,7 @@ test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES)
test_bitcoin_qt_SOURCES = test_main.cpp uritests.cpp paymentservertests.cpp $(TEST_QT_H)
nodist_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER) $(LIBBITCOIN_WALLET) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \
- $(LIBMEMENV) $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) \
+ $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
$(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index ae584706f1..ad0dfd9823 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -1,3 +1,4 @@
+#include "bitcoin-config.h"
#include "paymentservertests.h"
#include "uritests.h"
@@ -5,6 +6,14 @@
#include <QObject>
#include <QTest>
+#if defined(QT_STATICPLUGIN) && QT_VERSION < 0x050000
+#include <QtPlugin>
+Q_IMPORT_PLUGIN(qcncodecs)
+Q_IMPORT_PLUGIN(qjpcodecs)
+Q_IMPORT_PLUGIN(qtwcodecs)
+Q_IMPORT_PLUGIN(qkrcodecs)
+#endif
+
// This is all you need to run all the tests
int main(int argc, char *argv[])
{