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)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
FIND_PACKAGE(Qt5Core)
FIND_PACKAGE(Qt5Widgets)
FIND_PACKAGE(Qt5LinguistTools)
ENDIF(WITH_QT5)
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)
MACRO(NL_SETUP_DEFAULT_OPTIONS)
IF(WITH_QT)
IF(WITH_QT OR WITH_QT5)
OPTION(WITH_STUDIO "Build Core Studio" OFF )
ENDIF(WITH_QT)
ENDIF(WITH_QT OR WITH_QT5)
###
# Features

@ -1,5 +1,8 @@
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES})
IF(WITH_QT)
INCLUDE(${QT_USE_FILE})
ENDIF(WITH_QT)
FILE(GLOB SRC *.cpp *.h)
@ -16,13 +19,20 @@ SET(QT_PROPERTY_EDITOR_RCS qtpropertybrowser.qrc)
SET(QT_USE_QTGUI TRUE)
IF(WITH_QT5)
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(QtGeneratedMocSrc FILES ${QT_PROPERTY_EDITOR_MOC_SRC})
SOURCE_GROUP("Qt Property Editor Source" FILES ${SRC})
IF(WITH_QT)
qt4_generate_moc(qtpropertymanager.cpp ${CMAKE_CURRENT_BINARY_DIR}/qtpropertymanager.moc)
qt4_generate_moc(qteditorfactory.cpp ${CMAKE_CURRENT_BINARY_DIR}/qteditorfactory.moc)
qt4_generate_moc(qttreepropertybrowser.cpp ${CMAKE_CURRENT_BINARY_DIR}/qttreepropertybrowser.moc)
@ -44,6 +54,7 @@ SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertybrowser.cpp APPEND PRO
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}/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(
# qtpropertyeditor_HEADERS_ONLY_MOC
@ -77,14 +88,32 @@ SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtvariantproperty.cpp APPEND PRO
# ${qtpropertyeditor_HEADERS_ONLY_MOC}
#)
ADD_LIBRARY(qt_property_browser SHARED ${SRC}
INCLUDE_DIRECTORIES(${QT_INCLUDES})
IF(WITH_QT5)
ADD_LIBRARY(qt_property_browser SHARED
${SRC}
${QT_PROPERTY_EDITOR_MOC_SRC}
${QT_PROPERTY_EDITOR_RC_SRCS}
${QT_PROPERTY_EDITOR_RC_SRCS})
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(-DQT_DLL)

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

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

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

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

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

@ -86,14 +86,14 @@
****************************************************************************/
#include "qtpropertybrowserutils_p.h"
#include <QtGui/QApplication>
#include <QtGui/QPainter>
#include <QtGui/QHBoxLayout>
#include <QtGui/QMouseEvent>
#include <QtGui/QCheckBox>
#include <QtGui/QToolButton>
#include <QtGui/QLineEdit>
#include <QtGui/QMenu>
#include <QApplication>
#include <QPainter>
#include <QHBoxLayout>
#include <QMouseEvent>
#include <QCheckBox>
#include <QToolButton>
#include <QLineEdit>
#include <QMenu>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
@ -102,43 +102,43 @@ QT_BEGIN_NAMESPACE
QtCursorDatabase::QtCursorDatabase()
{
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
QApplication::UnicodeUTF8), QIcon());
-1), QIcon());
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,
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,
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,
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,
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,
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,
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,
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)
@ -222,7 +222,7 @@ QIcon QtPropertyBrowserUtils::brushValueIcon(const QBrush &b)
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.green()))
.arg(QString::number(c.blue()))
@ -252,7 +252,7 @@ QIcon QtPropertyBrowserUtils::fontValueIcon(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.pointSize());
}

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

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

@ -86,17 +86,17 @@
****************************************************************************/
#include "qttreepropertybrowser.h"
#include <QtCore/QSet>
#include <QtGui/QIcon>
#include <QtGui/QTreeWidget>
#include <QtGui/QItemDelegate>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QPainter>
#include <QtGui/QApplication>
#include <QtGui/QFocusEvent>
#include <QtGui/QStyle>
#include <QtGui/QPalette>
#include <QSet>
#include <QIcon>
#include <QTreeWidget>
#include <QItemDelegate>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QPainter>
#include <QApplication>
#include <QFocusEvent>
#include <QStyle>
#include <QPalette>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
@ -491,8 +491,8 @@ void QtTreePropertyBrowserPrivate::init(QWidget *parent)
m_treeWidget->setColumnCount(2);
QStringList labels;
labels.append(QApplication::translate("QtTreePropertyBrowser", "Property", 0, QApplication::UnicodeUTF8));
labels.append(QApplication::translate("QtTreePropertyBrowser", "Value", 0, QApplication::UnicodeUTF8));
labels.append(QApplication::translate("QtTreePropertyBrowser", "Property", 0, -1));
labels.append(QApplication::translate("QtTreePropertyBrowser", "Value", 0, -1));
m_treeWidget->setHeaderLabels(labels);
m_treeWidget->setAlternatingRowColors(true);
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) 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)
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the tools applications of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the either Technology Preview License Agreement or the
** Beta Release License Agreement.
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** 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
** 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
** 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.
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, 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
@ -79,8 +34,7 @@
** ensure the GNU General Public License version 3.0 requirements will be
** 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$
**
****************************************************************************/
@ -89,19 +43,16 @@
#define QTVARIANTPROPERTY_H
#include "qtpropertybrowser.h"
#include <QtCore/QVariant>
#include <QtGui/QIcon>
#include <QVariant>
#include <QIcon>
#if QT_VERSION >= 0x040400
QT_BEGIN_NAMESPACE
#endif
typedef QMap<int, QIcon> QtIconMap;
class QtVariantPropertyManager;
class QtVariantPropertyPrivate;
class QT_QTPROPERTYBROWSER_EXPORT QtVariantProperty : public QtProperty
class QtVariantProperty : public QtProperty
{
public:
~QtVariantProperty();
@ -116,12 +67,10 @@ protected:
QtVariantProperty(QtVariantPropertyManager *manager);
private:
friend class QtVariantPropertyManager;
QtVariantPropertyPrivate *d_ptr;
QScopedPointer<class QtVariantPropertyPrivate> d_ptr;
};
class QtVariantPropertyManagerPrivate;
class QT_QTPROPERTYBROWSER_EXPORT QtVariantPropertyManager : public QtAbstractPropertyManager
class QtVariantPropertyManager : public QtAbstractPropertyManager
{
Q_OBJECT
public:
@ -162,7 +111,7 @@ protected:
virtual void uninitializeProperty(QtProperty *property);
virtual QtProperty *createProperty();
private:
QtVariantPropertyManagerPrivate *d_ptr;
QScopedPointer<class QtVariantPropertyManagerPrivate> d_ptr;
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 slotSingleStepChanged(QtProperty *, int))
@ -204,9 +153,7 @@ private:
Q_DISABLE_COPY(QtVariantPropertyManager)
};
class QtVariantEditorFactoryPrivate;
class QT_QTPROPERTYBROWSER_EXPORT QtVariantEditorFactory : public QtAbstractEditorFactory<QtVariantPropertyManager>
class QtVariantEditorFactory : public QtAbstractEditorFactory<QtVariantPropertyManager>
{
Q_OBJECT
public:
@ -218,14 +165,12 @@ protected:
QWidget *parent);
void disconnectPropertyManager(QtVariantPropertyManager *manager);
private:
QtVariantEditorFactoryPrivate *d_ptr;
QScopedPointer<class QtVariantEditorFactoryPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtVariantEditorFactory)
Q_DISABLE_COPY(QtVariantEditorFactory)
};
#if QT_VERSION >= 0x040400
QT_END_NAMESPACE
#endif
Q_DECLARE_METATYPE(QIcon)
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})
IF(WITH_QT)
INCLUDE(${QT_USE_FILE})
ENDIF(WITH_QT)
CONFIGURE_FILE(translations/translations.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc COPYONLY)
@ -31,30 +33,54 @@ IF(WIN32)
SET(STUDIO_RC studio.rc)
ENDIF(WIN32)
IF(WITH_QT5)
SET(CMAKE_AUTOMOC ON)
QT5_ADD_TRANSLATION(STUDIO_QM ${STUDIO_TS})
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(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
${STUDIO_SRC}
${STUDIO_MOC_SRCS}
${STUDIO_RC_SRCS}
${STUDIO_RC}
${STUDIO_PLUGIN_UIS})
ENDIF(WITH_QT5)
TARGET_LINK_LIBRARIES(studio
nelmisc)
IF(WITH_QT5)
TARGET_LINK_LIBRARIES(studio
Qt5::Widgets)
ELSE(WITH_QT5)
TARGET_LINK_LIBRARIES(studio
nelmisc
${QT_LIBRARIES}
${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_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)

@ -427,7 +427,7 @@ void PluginSpec::kill()
bool b = loader->unload();
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;

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

Loading…
Cancel
Save