Qt5 build fixes

--HG--
branch : qt5
hg/feature/qt5
kaetemi 11 years ago
parent 86ed0efc65
commit ef81ffc4d9

@ -144,7 +144,9 @@ ENDIF(WITH_QT)
IF(WITH_QT5) IF(WITH_QT5)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
FIND_PACKAGE(Qt5Core)
FIND_PACKAGE(Qt5Widgets) FIND_PACKAGE(Qt5Widgets)
FIND_PACKAGE(Qt5LinguistTools)
ENDIF(WITH_QT5) ENDIF(WITH_QT5)
IF(WITH_NEL) IF(WITH_NEL)

@ -229,9 +229,9 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.:
ENDMACRO(CHECK_OUT_OF_SOURCE) ENDMACRO(CHECK_OUT_OF_SOURCE)
MACRO(NL_SETUP_DEFAULT_OPTIONS) MACRO(NL_SETUP_DEFAULT_OPTIONS)
IF(WITH_QT) IF(WITH_QT OR WITH_QT5)
OPTION(WITH_STUDIO "Build Core Studio" OFF ) OPTION(WITH_STUDIO "Build Core Studio" OFF )
ENDIF(WITH_QT) ENDIF(WITH_QT OR WITH_QT5)
### ###
# Features # Features

@ -1,5 +1,8 @@
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES})
INCLUDE(${QT_USE_FILE})
IF(WITH_QT)
INCLUDE(${QT_USE_FILE})
ENDIF(WITH_QT)
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
@ -16,34 +19,42 @@ SET(QT_PROPERTY_EDITOR_RCS qtpropertybrowser.qrc)
SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTGUI TRUE)
QT4_ADD_RESOURCES(QT_PROPERTY_EDITOR_RC_SRCS ${QT_PROPERTY_EDITOR_RCS}) IF(WITH_QT5)
QT4_WRAP_CPP(QT_PROPERTY_EDITOR_MOC_SRC ${QT_PROPERTY_EDITOR_HDR}) SET(CMAKE_AUTOMOC ON)
QT5_ADD_RESOURCES(QT_PROPERTY_EDITOR_RC_SRCS ${QT_PROPERTY_EDITOR_RCS})
#QT5_WRAP_CPP(QT_PROPERTY_EDITOR_MOC_SRC ${QT_PROPERTY_EDITOR_HDR})
ELSE(WITH_QT5)
QT4_ADD_RESOURCES(QT_PROPERTY_EDITOR_RC_SRCS ${QT_PROPERTY_EDITOR_RCS})
QT4_WRAP_CPP(QT_PROPERTY_EDITOR_MOC_SRC ${QT_PROPERTY_EDITOR_HDR})
ENDIF(WITH_QT5)
SOURCE_GROUP(QtResources FILES ${QT_PROPERTY_EDITOR_RCS}) SOURCE_GROUP(QtResources FILES ${QT_PROPERTY_EDITOR_RCS})
SOURCE_GROUP(QtGeneratedMocSrc FILES ${QT_PROPERTY_EDITOR_MOC_SRC}) SOURCE_GROUP(QtGeneratedMocSrc FILES ${QT_PROPERTY_EDITOR_MOC_SRC})
SOURCE_GROUP("Qt Property Editor Source" FILES ${SRC}) SOURCE_GROUP("Qt Property Editor Source" FILES ${SRC})
qt4_generate_moc(qtpropertymanager.cpp ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc) IF(WITH_QT)
qt4_generate_moc(qteditorfactory.cpp ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc) qt4_generate_moc(qtpropertymanager.cpp ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc)
qt4_generate_moc(qttreepropertybrowser.cpp ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc) qt4_generate_moc(qteditorfactory.cpp ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc)
qt4_generate_moc(qttreepropertybrowser.cpp ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc)
# Need to remove these so that they are not linked as they are inline included.
LIST(REMOVE_ITEM QT_PROPERTY_EDITOR_MOC_SRC ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx # Need to remove these so that they are not linked as they are inline included.
${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx LIST(REMOVE_ITEM QT_PROPERTY_EDITOR_MOC_SRC ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx
${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx
${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx
${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx
${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx
${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx) ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx
${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx)
# We need to add new depencencies on removed files because we need them to be still generated
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtbuttonpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx) # We need to add new depencencies on removed files because we need them to be still generated
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qteditorfactory.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx) SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtbuttonpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtgroupboxpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx) SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qteditorfactory.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx) SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtgroupboxpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertymanager.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx) SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qttreepropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx) SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertymanager.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtvariantproperty.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx) SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qttreepropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtvariantproperty.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx)
ENDIF(WITH_QT)
#set( #set(
# qtpropertyeditor_HEADERS_ONLY_MOC # qtpropertyeditor_HEADERS_ONLY_MOC
@ -77,14 +88,32 @@ SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtvariantproperty.cpp APPEND PRO
# ${qtpropertyeditor_HEADERS_ONLY_MOC} # ${qtpropertyeditor_HEADERS_ONLY_MOC}
#) #)
ADD_LIBRARY(qt_property_browser SHARED ${SRC} INCLUDE_DIRECTORIES(${QT_INCLUDES})
${QT_PROPERTY_EDITOR_MOC_SRC}
${QT_PROPERTY_EDITOR_RC_SRCS} IF(WITH_QT5)
${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc ADD_LIBRARY(qt_property_browser SHARED
${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc ${SRC}
${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc) ${QT_PROPERTY_EDITOR_MOC_SRC}
${QT_PROPERTY_EDITOR_RC_SRCS})
TARGET_LINK_LIBRARIES(qt_property_browser ${QT_LIBRARIES}) ELSE(WITH_QT5)
ADD_LIBRARY(qt_property_browser SHARED
${SRC}
${QT_PROPERTY_EDITOR_MOC_SRC}
${QT_PROPERTY_EDITOR_RC_SRCS})
ENDIF(WITH_QT5)
IF(WITH_QT)
ADD_LIBRARY(qt_property_browser SHARED
${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc
${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc
${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc)
ENDIF(WITH_QT)
IF(WITH_QT5)
TARGET_LINK_LIBRARIES(qt_property_browser Qt5::Widgets)
ELSE(WITH_QT5)
TARGET_LINK_LIBRARIES(qt_property_browser ${QT_LIBRARIES})
ENDIF(WITH_QT5)
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS(-DQT_DLL) ADD_DEFINITIONS(-DQT_DLL)

@ -86,13 +86,13 @@
****************************************************************************/ ****************************************************************************/
#include "qtbuttonpropertybrowser.h" #include "qtbuttonpropertybrowser.h"
#include <QtCore/QSet> #include <QSet>
#include <QtGui/QGridLayout> #include <QGridLayout>
#include <QtGui/QLabel> #include <QLabel>
#include <QtCore/QTimer> #include <QTimer>
#include <QtCore/QMap> #include <QMap>
#include <QtGui/QToolButton> #include <QToolButton>
#include <QtGui/QStyle> #include <QStyle>
#if QT_VERSION >= 0x040400 #if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

@ -87,29 +87,29 @@
#include "qteditorfactory.h" #include "qteditorfactory.h"
#include "qtpropertybrowserutils_p.h" #include "qtpropertybrowserutils_p.h"
#include <QtGui/QSpinBox> #include <QSpinBox>
#include <QtGui/QScrollBar> #include <QScrollBar>
#include <QtGui/QComboBox> #include <QComboBox>
#include <QtGui/QAbstractItemView> #include <QAbstractItemView>
#include <QtGui/QLineEdit> #include <QLineEdit>
#include <QtGui/QDateTimeEdit> #include <QDateTimeEdit>
#include <QtGui/QHBoxLayout> #include <QHBoxLayout>
#include <QtGui/QMenu> #include <QMenu>
#include <QtGui/QKeyEvent> #include <QKeyEvent>
#include <QtGui/QApplication> #include <QApplication>
#include <QtGui/QLabel> #include <QLabel>
#include <QtGui/QToolButton> #include <QToolButton>
#include <QtGui/QColorDialog> #include <QColorDialog>
#include <QtGui/QFontDialog> #include <QFontDialog>
#include <QtGui/QDialog> #include <QDialog>
#include <QtGui/QPlainTextEdit> #include <QPlainTextEdit>
#include <QtGui/QTextEdit> #include <QTextEdit>
#include <QCompleter> #include <QCompleter>
#include <QColumnView> #include <QColumnView>
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QtGui/QDialogButtonBox> #include <QDialogButtonBox>
#include <QtGui/QSpacerItem> #include <QSpacerItem>
#include <QtCore/QMap> #include <QMap>
#if defined(Q_CC_MSVC) #if defined(Q_CC_MSVC)
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */

@ -86,12 +86,12 @@
****************************************************************************/ ****************************************************************************/
#include "qtgroupboxpropertybrowser.h" #include "qtgroupboxpropertybrowser.h"
#include <QtCore/QSet> #include <QSet>
#include <QtGui/QGridLayout> #include <QGridLayout>
#include <QtGui/QLabel> #include <QLabel>
#include <QtGui/QGroupBox> #include <QGroupBox>
#include <QtCore/QTimer> #include <QTimer>
#include <QtCore/QMap> #include <QMap>
#if QT_VERSION >= 0x040400 #if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

@ -86,9 +86,9 @@
****************************************************************************/ ****************************************************************************/
#include "qtpropertybrowser.h" #include "qtpropertybrowser.h"
#include <QtCore/QSet> #include <QSet>
#include <QtCore/QMap> #include <QMap>
#include <QtGui/QIcon> #include <QIcon>
#if defined(Q_CC_MSVC) #if defined(Q_CC_MSVC)
# pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */ # pragma warning(disable: 4786) /* MS VS 6: truncating debug info after 255 characters */

@ -88,8 +88,8 @@
#ifndef QTPROPERTYBROWSER_H #ifndef QTPROPERTYBROWSER_H
#define QTPROPERTYBROWSER_H #define QTPROPERTYBROWSER_H
#include <QtGui/QWidget> #include <QWidget>
#include <QtCore/QSet> #include <QSet>
#if QT_VERSION >= 0x040400 #if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

@ -86,14 +86,14 @@
****************************************************************************/ ****************************************************************************/
#include "qtpropertybrowserutils_p.h" #include "qtpropertybrowserutils_p.h"
#include <QtGui/QApplication> #include <QApplication>
#include <QtGui/QPainter> #include <QPainter>
#include <QtGui/QHBoxLayout> #include <QHBoxLayout>
#include <QtGui/QMouseEvent> #include <QMouseEvent>
#include <QtGui/QCheckBox> #include <QCheckBox>
#include <QtGui/QToolButton> #include <QToolButton>
#include <QtGui/QLineEdit> #include <QLineEdit>
#include <QtGui/QMenu> #include <QMenu>
#if QT_VERSION >= 0x040400 #if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -102,43 +102,43 @@ QT_BEGIN_NAMESPACE
QtCursorDatabase::QtCursorDatabase() QtCursorDatabase::QtCursorDatabase()
{ {
appendCursor(Qt::ArrowCursor, QApplication::translate("QtCursorDatabase", "Arrow", 0, appendCursor(Qt::ArrowCursor, QApplication::translate("QtCursorDatabase", "Arrow", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-arrow.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-arrow.png")));
appendCursor(Qt::UpArrowCursor, QApplication::translate("QtCursorDatabase", "Up Arrow", 0, appendCursor(Qt::UpArrowCursor, QApplication::translate("QtCursorDatabase", "Up Arrow", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-uparrow.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-uparrow.png")));
appendCursor(Qt::CrossCursor, QApplication::translate("QtCursorDatabase", "Cross", 0, appendCursor(Qt::CrossCursor, QApplication::translate("QtCursorDatabase", "Cross", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-cross.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-cross.png")));
appendCursor(Qt::WaitCursor, QApplication::translate("QtCursorDatabase", "Wait", 0, appendCursor(Qt::WaitCursor, QApplication::translate("QtCursorDatabase", "Wait", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-wait.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-wait.png")));
appendCursor(Qt::IBeamCursor, QApplication::translate("QtCursorDatabase", "IBeam", 0, appendCursor(Qt::IBeamCursor, QApplication::translate("QtCursorDatabase", "IBeam", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-ibeam.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-ibeam.png")));
appendCursor(Qt::SizeVerCursor, QApplication::translate("QtCursorDatabase", "Size Vertical", 0, appendCursor(Qt::SizeVerCursor, QApplication::translate("QtCursorDatabase", "Size Vertical", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizev.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizev.png")));
appendCursor(Qt::SizeHorCursor, QApplication::translate("QtCursorDatabase", "Size Horizontal", 0, appendCursor(Qt::SizeHorCursor, QApplication::translate("QtCursorDatabase", "Size Horizontal", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeh.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeh.png")));
appendCursor(Qt::SizeFDiagCursor, QApplication::translate("QtCursorDatabase", "Size Backslash", 0, appendCursor(Qt::SizeFDiagCursor, QApplication::translate("QtCursorDatabase", "Size Backslash", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizef.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizef.png")));
appendCursor(Qt::SizeBDiagCursor, QApplication::translate("QtCursorDatabase", "Size Slash", 0, appendCursor(Qt::SizeBDiagCursor, QApplication::translate("QtCursorDatabase", "Size Slash", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeb.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeb.png")));
appendCursor(Qt::SizeAllCursor, QApplication::translate("QtCursorDatabase", "Size All", 0, appendCursor(Qt::SizeAllCursor, QApplication::translate("QtCursorDatabase", "Size All", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeall.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-sizeall.png")));
appendCursor(Qt::BlankCursor, QApplication::translate("QtCursorDatabase", "Blank", 0, appendCursor(Qt::BlankCursor, QApplication::translate("QtCursorDatabase", "Blank", 0,
QApplication::UnicodeUTF8), QIcon()); -1), QIcon());
appendCursor(Qt::SplitVCursor, QApplication::translate("QtCursorDatabase", "Split Vertical", 0, appendCursor(Qt::SplitVCursor, QApplication::translate("QtCursorDatabase", "Split Vertical", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-vsplit.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-vsplit.png")));
appendCursor(Qt::SplitHCursor, QApplication::translate("QtCursorDatabase", "Split Horizontal", 0, appendCursor(Qt::SplitHCursor, QApplication::translate("QtCursorDatabase", "Split Horizontal", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-hsplit.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-hsplit.png")));
appendCursor(Qt::PointingHandCursor, QApplication::translate("QtCursorDatabase", "Pointing Hand", 0, appendCursor(Qt::PointingHandCursor, QApplication::translate("QtCursorDatabase", "Pointing Hand", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-hand.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-hand.png")));
appendCursor(Qt::ForbiddenCursor, QApplication::translate("QtCursorDatabase", "Forbidden", 0, appendCursor(Qt::ForbiddenCursor, QApplication::translate("QtCursorDatabase", "Forbidden", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-forbidden.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-forbidden.png")));
appendCursor(Qt::OpenHandCursor, QApplication::translate("QtCursorDatabase", "Open Hand", 0, appendCursor(Qt::OpenHandCursor, QApplication::translate("QtCursorDatabase", "Open Hand", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-openhand.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-openhand.png")));
appendCursor(Qt::ClosedHandCursor, QApplication::translate("QtCursorDatabase", "Closed Hand", 0, appendCursor(Qt::ClosedHandCursor, QApplication::translate("QtCursorDatabase", "Closed Hand", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-closedhand.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-closedhand.png")));
appendCursor(Qt::WhatsThisCursor, QApplication::translate("QtCursorDatabase", "What's This", 0, appendCursor(Qt::WhatsThisCursor, QApplication::translate("QtCursorDatabase", "What's This", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-whatsthis.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-whatsthis.png")));
appendCursor(Qt::BusyCursor, QApplication::translate("QtCursorDatabase", "Busy", 0, appendCursor(Qt::BusyCursor, QApplication::translate("QtCursorDatabase", "Busy", 0,
QApplication::UnicodeUTF8), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-busy.png"))); -1), QIcon(QLatin1String(":/trolltech/qtpropertybrowser/images/cursor-busy.png")));
} }
void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon) void QtCursorDatabase::appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon)
@ -222,7 +222,7 @@ QIcon QtPropertyBrowserUtils::brushValueIcon(const QBrush &b)
QString QtPropertyBrowserUtils::colorValueText(const QColor &c) QString QtPropertyBrowserUtils::colorValueText(const QColor &c)
{ {
return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2, %3] (%4)", 0, QApplication::UnicodeUTF8) return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2, %3] (%4)", 0, -1)
.arg(QString::number(c.red())) .arg(QString::number(c.red()))
.arg(QString::number(c.green())) .arg(QString::number(c.green()))
.arg(QString::number(c.blue())) .arg(QString::number(c.blue()))
@ -252,7 +252,7 @@ QIcon QtPropertyBrowserUtils::fontValueIcon(const QFont &f)
QString QtPropertyBrowserUtils::fontValueText(const QFont &f) QString QtPropertyBrowserUtils::fontValueText(const QFont &f)
{ {
return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2]", 0, QApplication::UnicodeUTF8) return QApplication::translate("QtPropertyBrowserUtils", "[%1, %2]", 0, -1)
.arg(f.family()) .arg(f.family())
.arg(f.pointSize()); .arg(f.pointSize());
} }

@ -99,10 +99,10 @@
#ifndef QTPROPERTYBROWSERUTILS_H #ifndef QTPROPERTYBROWSERUTILS_H
#define QTPROPERTYBROWSERUTILS_H #define QTPROPERTYBROWSERUTILS_H
#include <QtCore/QMap> #include <QMap>
#include <QtGui/QIcon> #include <QIcon>
#include <QtGui/QWidget> #include <QWidget>
#include <QtCore/QStringList> #include <QStringList>
#if QT_VERSION >= 0x040400 #if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

@ -87,18 +87,18 @@
#include "qtpropertymanager.h" #include "qtpropertymanager.h"
#include "qtpropertybrowserutils_p.h" #include "qtpropertybrowserutils_p.h"
#include <QtCore/QDateTime> #include <QDateTime>
#include <QtCore/QLocale> #include <QLocale>
#include <QtCore/QMap> #include <QMap>
#include <QtCore/QTimer> #include <QTimer>
#include <QtGui/QIcon> #include <QIcon>
#include <QtCore/QMetaEnum> #include <QMetaEnum>
#include <QtGui/QFontDatabase> #include <QFontDatabase>
#include <QtGui/QStyleOption> #include <QStyleOption>
#include <QtGui/QStyle> #include <QStyle>
#include <QtGui/QApplication> #include <QApplication>
#include <QtGui/QPainter> #include <QPainter>
#include <QtGui/QLabel> #include <QLabel>
#include <QStringRef> #include <QStringRef>
#include <limits.h> #include <limits.h>

@ -86,17 +86,17 @@
****************************************************************************/ ****************************************************************************/
#include "qttreepropertybrowser.h" #include "qttreepropertybrowser.h"
#include <QtCore/QSet> #include <QSet>
#include <QtGui/QIcon> #include <QIcon>
#include <QtGui/QTreeWidget> #include <QTreeWidget>
#include <QtGui/QItemDelegate> #include <QItemDelegate>
#include <QtGui/QHBoxLayout> #include <QHBoxLayout>
#include <QtGui/QHeaderView> #include <QHeaderView>
#include <QtGui/QPainter> #include <QPainter>
#include <QtGui/QApplication> #include <QApplication>
#include <QtGui/QFocusEvent> #include <QFocusEvent>
#include <QtGui/QStyle> #include <QStyle>
#include <QtGui/QPalette> #include <QPalette>
#if QT_VERSION >= 0x040400 #if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -491,8 +491,8 @@ void QtTreePropertyBrowserPrivate::init(QWidget *parent)
m_treeWidget->setColumnCount(2); m_treeWidget->setColumnCount(2);
QStringList labels; QStringList labels;
labels.append(QApplication::translate("QtTreePropertyBrowser", "Property", 0, QApplication::UnicodeUTF8)); labels.append(QApplication::translate("QtTreePropertyBrowser", "Property", 0, -1));
labels.append(QApplication::translate("QtTreePropertyBrowser", "Value", 0, QApplication::UnicodeUTF8)); labels.append(QApplication::translate("QtTreePropertyBrowser", "Value", 0, -1));
m_treeWidget->setHeaderLabels(labels); m_treeWidget->setHeaderLabels(labels);
m_treeWidget->setAlternatingRowColors(true); m_treeWidget->setAlternatingRowColors(true);
m_treeWidget->setEditTriggers(QAbstractItemView::EditKeyPressed); m_treeWidget->setEditTriggers(QAbstractItemView::EditKeyPressed);

File diff suppressed because it is too large Load Diff

@ -1,62 +1,18 @@
/**************************************************************************** /****************************************************************************
** **
** This file is part of a Qt Solutions component. ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** ** Contact: http://www.qt-project.org/legal
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Solutions Commercial License Agreement provided
** with the Software or, alternatively, in accordance with the terms
** contained in a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** Please note Third Party Software included with Qt Solutions may impose
** additional restrictions and it is the user's responsibility to ensure
** that they have met the licensing requirements of the GPL, LGPL, or Qt
** Solutions Commercial license and the relevant license of the Third
** Party Software they are using.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
****************************************************************************/
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
** **
** This file is part of the tools applications of the Qt Toolkit. ** This file is part of the tools applications of the Qt Toolkit.
** **
** $QT_BEGIN_LICENSE:LGPL$ ** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage ** Commercial License Usage
** This file contains pre-release code and may not be distributed. ** Licensees holding valid commercial Qt licenses may use this file in
** You may use this file in accordance with the terms and conditions ** accordance with the commercial license agreement provided with the
** contained in the either Technology Preview License Agreement or the ** Software or, alternatively, in accordance with the terms contained in
** Beta Release License Agreement. ** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
** **
** GNU Lesser General Public License Usage ** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser ** Alternatively, this file may be used under the terms of the GNU Lesser
@ -66,10 +22,9 @@
** ensure the GNU Lesser General Public License version 2.1 requirements ** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
** **
** In addition, as a special exception, Nokia gives you certain ** In addition, as a special exception, Digia gives you certain additional
** additional rights. These rights are described in the Nokia Qt LGPL ** rights. These rights are described in the Digia Qt LGPL Exception
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
** package.
** **
** GNU General Public License Usage ** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU ** Alternatively, this file may be used under the terms of the GNU
@ -79,8 +34,7 @@
** ensure the GNU General Public License version 3.0 requirements will be ** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html. ** met: http://www.gnu.org/copyleft/gpl.html.
** **
** If you are unsure which license is appropriate for your use, please **
** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$ ** $QT_END_LICENSE$
** **
****************************************************************************/ ****************************************************************************/
@ -89,19 +43,16 @@
#define QTVARIANTPROPERTY_H #define QTVARIANTPROPERTY_H
#include "qtpropertybrowser.h" #include "qtpropertybrowser.h"
#include <QtCore/QVariant> #include <QVariant>
#include <QtGui/QIcon> #include <QIcon>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
#endif
typedef QMap<int, QIcon> QtIconMap; typedef QMap<int, QIcon> QtIconMap;
class QtVariantPropertyManager; class QtVariantPropertyManager;
class QtVariantPropertyPrivate;
class QT_QTPROPERTYBROWSER_EXPORT QtVariantProperty : public QtProperty class QtVariantProperty : public QtProperty
{ {
public: public:
~QtVariantProperty(); ~QtVariantProperty();
@ -116,12 +67,10 @@ protected:
QtVariantProperty(QtVariantPropertyManager *manager); QtVariantProperty(QtVariantPropertyManager *manager);
private: private:
friend class QtVariantPropertyManager; friend class QtVariantPropertyManager;
QtVariantPropertyPrivate *d_ptr; QScopedPointer<class QtVariantPropertyPrivate> d_ptr;
}; };
class QtVariantPropertyManagerPrivate; class QtVariantPropertyManager : public QtAbstractPropertyManager
class QT_QTPROPERTYBROWSER_EXPORT QtVariantPropertyManager : public QtAbstractPropertyManager
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -162,7 +111,7 @@ protected:
virtual void uninitializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property);
virtual QtProperty *createProperty(); virtual QtProperty *createProperty();
private: private:
QtVariantPropertyManagerPrivate *d_ptr; QScopedPointer<class QtVariantPropertyManagerPrivate> d_ptr;
Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, int)) Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, int))
Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int)) Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int))
Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int)) Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int))
@ -204,9 +153,7 @@ private:
Q_DISABLE_COPY(QtVariantPropertyManager) Q_DISABLE_COPY(QtVariantPropertyManager)
}; };
class QtVariantEditorFactoryPrivate; class QtVariantEditorFactory : public QtAbstractEditorFactory<QtVariantPropertyManager>
class QT_QTPROPERTYBROWSER_EXPORT QtVariantEditorFactory : public QtAbstractEditorFactory<QtVariantPropertyManager>
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -218,14 +165,12 @@ protected:
QWidget *parent); QWidget *parent);
void disconnectPropertyManager(QtVariantPropertyManager *manager); void disconnectPropertyManager(QtVariantPropertyManager *manager);
private: private:
QtVariantEditorFactoryPrivate *d_ptr; QScopedPointer<class QtVariantEditorFactoryPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtVariantEditorFactory) Q_DECLARE_PRIVATE(QtVariantEditorFactory)
Q_DISABLE_COPY(QtVariantEditorFactory) Q_DISABLE_COPY(QtVariantEditorFactory)
}; };
#if QT_VERSION >= 0x040400
QT_END_NAMESPACE QT_END_NAMESPACE
#endif
Q_DECLARE_METATYPE(QIcon) Q_DECLARE_METATYPE(QIcon)
Q_DECLARE_METATYPE(QtIconMap) Q_DECLARE_METATYPE(QtIconMap)

@ -1,7 +1,9 @@
ADD_SUBDIRECTORY(3rdparty)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${LIBXML2_INCLUDE_DIR} ${NEL_INCLUDE_DIR} ${QT_INCLUDES})
INCLUDE( ${QT_USE_FILE} )
IF(WITH_QT)
INCLUDE(${QT_USE_FILE})
ENDIF(WITH_QT)
CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY) CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY)
@ -31,30 +33,54 @@ IF(WIN32)
SET(STUDIO_RC studio.rc) SET(STUDIO_RC studio.rc)
ENDIF(WIN32) ENDIF(WIN32)
QT4_ADD_TRANSLATION(STUDIO_QM ${STUDIO_TS}) IF(WITH_QT5)
QT4_ADD_RESOURCES( STUDIO_RC_SRCS ${STUDIO_RCS}) SET(CMAKE_AUTOMOC ON)
QT4_WRAP_CPP( STUDIO_MOC_SRCS ${STUDIO_HDR} ) QT5_ADD_TRANSLATION(STUDIO_QM ${STUDIO_TS})
QT4_WRAP_UI( STUDIO_PLUGIN_UI_HDRS ${STUDIO_PLUGIN_UIS}) QT5_ADD_RESOURCES( STUDIO_RC_SRCS ${STUDIO_RCS})
QT5_WRAP_CPP( STUDIO_MOC_SRCS ${STUDIO_HDR} )
QT5_WRAP_UI( STUDIO_PLUGIN_UI_HDRS ${STUDIO_PLUGIN_UIS})
ELSE(WITH_QT5)
QT4_ADD_TRANSLATION(STUDIO_QM ${STUDIO_TS})
QT4_ADD_RESOURCES( STUDIO_RC_SRCS ${STUDIO_RCS})
QT4_WRAP_CPP( STUDIO_MOC_SRCS ${STUDIO_HDR} )
QT4_WRAP_UI( STUDIO_PLUGIN_UI_HDRS ${STUDIO_PLUGIN_UIS})
ENDIF(WITH_QT5)
SOURCE_GROUP(QtResources FILES ${STUDIO_RCS} ${STUDIO_PLUGIN_UIS} ) SOURCE_GROUP(QtResources FILES ${STUDIO_RCS} ${STUDIO_PLUGIN_UIS} )
SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${STUDIO_MOC_SRCS} ${STUDIO_RC_SRCS}) SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${STUDIO_MOC_SRCS} ${STUDIO_RC_SRCS})
IF(WITH_QT5)
ADD_EXECUTABLE(studio WIN32 MACOSX_BUNDLE
${STUDIO_SRC}
${STUDIO_RC_SRCS}
${STUDIO_RC}
${STUDIO_PLUGIN_UIS})
ELSE(WITH_QT5)
ADD_EXECUTABLE(studio WIN32 MACOSX_BUNDLE ADD_EXECUTABLE(studio WIN32 MACOSX_BUNDLE
${STUDIO_SRC} ${STUDIO_SRC}
${STUDIO_MOC_SRCS} ${STUDIO_MOC_SRCS}
${STUDIO_RC_SRCS} ${STUDIO_RC_SRCS}
${STUDIO_RC} ${STUDIO_RC}
${STUDIO_PLUGIN_UIS} ) ${STUDIO_PLUGIN_UIS})
ENDIF(WITH_QT5)
TARGET_LINK_LIBRARIES(studio TARGET_LINK_LIBRARIES(studio
nelmisc nelmisc)
IF(WITH_QT5)
TARGET_LINK_LIBRARIES(studio
Qt5::Widgets)
ELSE(WITH_QT5)
TARGET_LINK_LIBRARIES(studio
${QT_LIBRARIES} ${QT_LIBRARIES}
${QT_QTMAIN_LIBRARY}) ${QT_QTMAIN_LIBRARY})
ENDIF(WITH_QT5)
ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${LIBXML2_DEFINITIONS} ${QT_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${QT_DEFINITIONS})
NL_DEFAULT_PROPS(studio "Tools: Studio") NL_DEFAULT_PROPS(studio "Tools: Studio")
NL_ADD_RUNTIME_FLAGS(studio) NL_ADD_RUNTIME_FLAGS(studio)
ADD_SUBDIRECTORY(plugins) ADD_SUBDIRECTORY(3rdparty)
#ADD_SUBDIRECTORY(plugins)
INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications) INSTALL(TARGETS studio RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT runtime BUNDLE DESTINATION /Applications)

@ -427,7 +427,7 @@ void PluginSpec::kill()
bool b = loader->unload(); bool b = loader->unload();
if( !b ) if( !b )
{ {
nlinfo( "Plugin %s couldn't be unloaded.", this->m_name.toAscii().data() ); nlinfo( "Plugin %s couldn't be unloaded.", this->m_name.toLocal8Bit().data() );
} }
//delete m_plugin; //delete m_plugin;

@ -35,11 +35,11 @@
#include <QtCore/QLibraryInfo> #include <QtCore/QLibraryInfo>
#include <QtCore/QLocale> #include <QtCore/QLocale>
#include <QtCore/QSettings> #include <QtCore/QSettings>
#include <QtGui/QMessageBox> #include <QtWidgets/QMessageBox>
#include <QtGui/QApplication> #include <QtWidgets/QApplication>
//#include <QtGui/QSplashScreen> //#include <QtGui/QSplashScreen>
#include <QtGui/QFileDialog> #include <QtWidgets/QFileDialog>
#include <QtGui/QInputDialog> #include <QtWidgets/QInputDialog>
#include "settings_dialog.h" #include "settings_dialog.h"
#include "splash_screen.h" #include "splash_screen.h"
@ -137,7 +137,7 @@ int main(int argc, char **argv)
nlinfo("Welcome to NeL Object Viewer Qt!"); nlinfo("Welcome to NeL Object Viewer Qt!");
} }
QApplication::setGraphicsSystem("raster");
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
QApplication app(__argc, __argv); QApplication app(__argc, __argv);
#else // NL_OS_WINDOWS #else // NL_OS_WINDOWS

Loading…
Cancel
Save