diff --git a/share/qtcreator/dumper/dumper.cpp b/share/qtcreator/dumper/dumper.cpp index 8f64da17c60..25008297921 100644 --- a/share/qtcreator/dumper/dumper.cpp +++ b/share/qtcreator/dumper/dumper.cpp @@ -77,16 +77,25 @@ # endif #endif -#if USE_QT_GUI -# include +#ifndef USE_QT_WIDGETS +# if defined(QT_WIDGETS_LIB) || ((QT_VERSION < 0x050000) && defined(USE_QT_GUI)) +# define USE_QT_WIDGETS 1 +# endif +#endif + +#ifdef USE_QT_GUI # include # include # include -# include # include # include # include -# include +#endif + +#ifdef USE_QT_WIDGETS +# include +# include +# include #endif #endif // QT_BOOTSTRAPPED @@ -1670,7 +1679,7 @@ static void qDumpQImage(QDumper &d) static void qDumpQImageData(QDumper &d) { const QImage &im = *reinterpret_cast(d.data); - const QByteArray ba(QByteArray::fromRawData((const char*)im.bits(), im.numBytes())); + const QByteArray ba(QByteArray::fromRawData((const char*)im.bits(), im.byteCount())); d.putItem("type", NS"QImageData"); d.putItem("numchild", "0"); #if 1 @@ -1703,7 +1712,10 @@ static void qDumpQList(QDumper &d) return; if (pdata.d->begin > pdata.d->end) return; -#if QT_VERSION >= 0x040400 +#if QT_VERSION >= 0x050000 + if (pdata.d->ref.atomic._q_value <= 0) + return; +#elif QT_VERSION >= 0x040400 if (pdata.d->ref._q_value <= 0) return; #endif diff --git a/share/qtcreator/dumper/dumper.pro b/share/qtcreator/dumper/dumper.pro index 323ff220e58..818b03a5d60 100644 --- a/share/qtcreator/dumper/dumper.pro +++ b/share/qtcreator/dumper/dumper.pro @@ -13,6 +13,7 @@ else { DEFINES += USE_QT_GUI=1 QT = core \ gui + greaterThan(QT_MAJOR_VERSION, 4):QT *= widgets } exists($$QMAKE_INCDIR_QT/QtCore/private/qobject_p.h):DEFINES += HAS_QOBJECT_P_H HEADERS += dumper.h diff --git a/share/qtcreator/dumper/test/dumpertest.pro b/share/qtcreator/dumper/test/dumpertest.pro index be4c9a58948..95546a6f264 100644 --- a/share/qtcreator/dumper/test/dumpertest.pro +++ b/share/qtcreator/dumper/test/dumpertest.pro @@ -7,7 +7,7 @@ TARGET = dumpertest CONFIG += console CONFIG -= app_bundle - +greaterThan(QT_MAJOR_VERSION, 4):QT *= widgets TEMPLATE = app SOURCES += main.cpp \ diff --git a/share/qtcreator/dumper/test/main.cpp b/share/qtcreator/dumper/test/main.cpp index fc1b3e8a20c..c9920f33475 100644 --- a/share/qtcreator/dumper/test/main.cpp +++ b/share/qtcreator/dumper/test/main.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/manual/debugger/gui/gui.pro b/tests/manual/debugger/gui/gui.pro index c62000beabd..3bab60a05a1 100644 --- a/tests/manual/debugger/gui/gui.pro +++ b/tests/manual/debugger/gui/gui.pro @@ -1,5 +1,7 @@ TARGET = gui CONFIG+=console +greaterThan(QT_MAJOR_VERSION, 4):QT *= widgets + TEMPLATE = app SOURCES += \ mainwindow.cpp \ diff --git a/tests/manual/debugger/gui/mainwindow.h b/tests/manual/debugger/gui/mainwindow.h index 2a7479e4235..dc1fe89796e 100644 --- a/tests/manual/debugger/gui/mainwindow.h +++ b/tests/manual/debugger/gui/mainwindow.h @@ -33,7 +33,7 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include QT_BEGIN_NAMESPACE class QThread; diff --git a/tests/manual/debugger/gui/tst_gui.cpp b/tests/manual/debugger/gui/tst_gui.cpp index e537b0db970..73dd36c442f 100644 --- a/tests/manual/debugger/gui/tst_gui.cpp +++ b/tests/manual/debugger/gui/tst_gui.cpp @@ -30,7 +30,7 @@ ** **************************************************************************/ -#include +#include #include #include "mainwindow.h" diff --git a/tests/manual/debugger/helper/helper.pro b/tests/manual/debugger/helper/helper.pro index 5ccf8f946d1..867eb3fa2c5 100644 --- a/tests/manual/debugger/helper/helper.pro +++ b/tests/manual/debugger/helper/helper.pro @@ -1,5 +1,6 @@ include(../../../../qtcreator.pri) TEMPLATE = app +greaterThan(QT_MAJOR_VERSION, 4):QT *= widgets win32:DEFINES += _CRT_SECURE_NO_WARNINGS SOURCES += $$IDE_SOURCE_TREE/share/qtcreator/dumper/dumper.cpp diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index d253b476265..813435937eb 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -102,18 +102,14 @@ void dummyStatement(...) {} #include #endif -#include -#include #include #include -#include - //#include #include #include #include -#include + #include #include @@ -127,6 +123,11 @@ void dummyStatement(...) {} #include #include +#include // QWidgets: Separate module as of Qt 5 +#include +#include +#include + #include #include #include diff --git a/tests/manual/debugger/simple/simple_test_app.pro b/tests/manual/debugger/simple/simple_test_app.pro index d00ffa8c2f2..84a29ff16b2 100644 --- a/tests/manual/debugger/simple/simple_test_app.pro +++ b/tests/manual/debugger/simple/simple_test_app.pro @@ -9,7 +9,10 @@ SOURCES += simple_test_app.cpp QT += network QT += script QT += xml -QT += core-private +greaterThan(QT_MAJOR_VERSION, 4) { + QT += core-private + QT *= widgets +} #unix: QMAKE_CXXFLAGS += -msse2 #DEFINES += USE_BOOST=1