diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/Makefile.am | 4 | ||||
-rw-r--r-- | src/qt/bitcoin.cpp | 18 | ||||
-rw-r--r-- | src/qt/notificator.cpp | 16 | ||||
-rw-r--r-- | src/qt/test/Makefile.am | 2 | ||||
-rw-r--r-- | src/qt/test/test_main.cpp | 9 |
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[]) { |