forked from qt-creator/qt-creator
Debugger: Compile manual debugger tests and dumber lib with Qt5.
Introduce conditionals in the profiles and source code to be able to test Qt 4 and Qt 5. Change-Id: I73df5558f2945742d3e56f94baca0ee4d5f9dab8 Reviewed-on: http://codereview.qt-project.org/6330 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -77,16 +77,25 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if USE_QT_GUI
|
||||
# include <QtGui/QApplication>
|
||||
#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 <QtGui/QImage>
|
||||
# include <QtGui/QRegion>
|
||||
# include <QtGui/QPixmap>
|
||||
# include <QtGui/QWidget>
|
||||
# include <QtGui/QFont>
|
||||
# include <QtGui/QColor>
|
||||
# include <QtGui/QKeySequence>
|
||||
# include <QtGui/QSizePolicy>
|
||||
#endif
|
||||
|
||||
#ifdef USE_QT_WIDGETS
|
||||
# include <QSizePolicy>
|
||||
# include <QWidget>
|
||||
# include <QApplication>
|
||||
#endif
|
||||
|
||||
#endif // QT_BOOTSTRAPPED
|
||||
@@ -1670,7 +1679,7 @@ static void qDumpQImage(QDumper &d)
|
||||
static void qDumpQImageData(QDumper &d)
|
||||
{
|
||||
const QImage &im = *reinterpret_cast<const QImage *>(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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
TARGET = dumpertest
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4):QT *= widgets
|
||||
TEMPLATE = app
|
||||
|
||||
SOURCES += main.cpp \
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtGui/QAction>
|
||||
#include <QAction>
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
TARGET = gui
|
||||
CONFIG+=console
|
||||
greaterThan(QT_MAJOR_VERSION, 4):QT *= widgets
|
||||
|
||||
TEMPLATE = app
|
||||
SOURCES += \
|
||||
mainwindow.cpp \
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QMainWindow>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QThread;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QApplication>
|
||||
#include <QtDebug>
|
||||
#include "mainwindow.h"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -102,18 +102,14 @@ void dummyStatement(...) {}
|
||||
#include <QtCore/QSharedPointer>
|
||||
#endif
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QAction>
|
||||
#include <QtGui/QColor>
|
||||
#include <QtGui/QFont>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
|
||||
//#include <QtGui/private/qfixed_p.h>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPainterPath>
|
||||
#include <QtGui/QRegion>
|
||||
#include <QtGui/QStandardItemModel>
|
||||
|
||||
#include <QtGui/QTextCursor>
|
||||
#include <QtGui/QTextDocument>
|
||||
|
||||
@@ -127,6 +123,11 @@ void dummyStatement(...) {}
|
||||
#include <QtNetwork/QHostAddress>
|
||||
#include <QtNetwork/QNetworkRequest>
|
||||
|
||||
#include <QApplication> // QWidgets: Separate module as of Qt 5
|
||||
#include <QAction>
|
||||
#include <QStandardItemModel>
|
||||
#include <QLabel>
|
||||
|
||||
#include <deque>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user