Qt5 build fixes (plugins/core)

--HG--
branch : qt5
hg/feature/qt5
kaetemi 10 years ago
parent 885a7570f2
commit f79b66ca82

@ -81,6 +81,6 @@ NL_DEFAULT_PROPS(studio "Tools: Studio")
NL_ADD_RUNTIME_FLAGS(studio) NL_ADD_RUNTIME_FLAGS(studio)
ADD_SUBDIRECTORY(3rdparty) ADD_SUBDIRECTORY(3rdparty)
#ADD_SUBDIRECTORY(plugins) 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)

@ -19,9 +19,9 @@
#ifndef IPLUGIN_H #ifndef IPLUGIN_H
#define IPLUGIN_H #define IPLUGIN_H
#include <QtCore/QtPlugin> #include <QtPlugin>
#include <QtCore/QString> #include <QString>
#include <QtCore/QStringList> #include <QStringList>
#include "iplugin_manager.h" #include "iplugin_manager.h"
@ -99,6 +99,7 @@ public:
}; //namespace ExtensionSystem }; //namespace ExtensionSystem
Q_DECLARE_INTERFACE(ExtensionSystem::IPlugin, "dev.ryzom.com.ObjectViewerQt.IPlugin/0.9.2") #define NL_STUDIO_IPLUGIN_IID "org.ryzomcore.Studio.IPlugin/0.10.0"
Q_DECLARE_INTERFACE(ExtensionSystem::IPlugin, NL_STUDIO_IPLUGIN_IID)
#endif // IPLUGIN_H #endif // IPLUGIN_H

@ -21,10 +21,10 @@
#include "iplugin_spec.h" #include "iplugin_spec.h"
#include <QtCore/QList> #include <QList>
#include <QtCore/QObject> #include <QObject>
#include <QtCore/QStringList> #include <QStringList>
#include <QtCore/QSettings> #include <QSettings>
namespace ExtensionSystem namespace ExtensionSystem
{ {

@ -19,7 +19,7 @@
#ifndef IPLUGINSPEC_H #ifndef IPLUGINSPEC_H
#define IPLUGINSPEC_H #define IPLUGINSPEC_H
#include <QtCore/QString> #include <QString>
namespace ExtensionSystem namespace ExtensionSystem
{ {

@ -1,24 +1,24 @@
ADD_SUBDIRECTORY(core) ADD_SUBDIRECTORY(core)
ADD_SUBDIRECTORY(example) #ADD_SUBDIRECTORY(example)
ADD_SUBDIRECTORY(ovqt_sheet_builder) #ADD_SUBDIRECTORY(ovqt_sheet_builder)
ADD_SUBDIRECTORY(landscape_editor) #ADD_SUBDIRECTORY(landscape_editor)
ADD_SUBDIRECTORY(log) #ADD_SUBDIRECTORY(log)
ADD_SUBDIRECTORY(disp_sheet_id) #ADD_SUBDIRECTORY(disp_sheet_id)
ADD_SUBDIRECTORY(object_viewer) #ADD_SUBDIRECTORY(object_viewer)
ADD_SUBDIRECTORY(georges_editor) #ADD_SUBDIRECTORY(georges_editor)
ADD_SUBDIRECTORY(world_editor) #ADD_SUBDIRECTORY(world_editor)
IF(WITH_GUI) #IF(WITH_GUI)
ADD_SUBDIRECTORY(gui_editor) # ADD_SUBDIRECTORY(gui_editor)
ENDIF(WITH_GUI) #ENDIF(WITH_GUI)
ADD_SUBDIRECTORY(translation_manager) #ADD_SUBDIRECTORY(translation_manager)
ADD_SUBDIRECTORY(tile_editor) #ADD_SUBDIRECTORY(tile_editor)
ADD_SUBDIRECTORY(bnp_manager) #ADD_SUBDIRECTORY(bnp_manager)
# Note: Temporarily disabled until development continues. # Note: Temporarily disabled until development continues.
#ADD_SUBDIRECTORY(zone_painter) #ADD_SUBDIRECTORY(zone_painter)
# Ryzom Specific Plugins # Ryzom Specific Plugins
IF(WITH_RYZOM AND WITH_RYZOM_TOOLS) #IF(WITH_RYZOM AND WITH_RYZOM_TOOLS)
ADD_SUBDIRECTORY(mission_compiler) # ADD_SUBDIRECTORY(mission_compiler)
ENDIF(WITH_RYZOM AND WITH_RYZOM_TOOLS) #ENDIF(WITH_RYZOM AND WITH_RYZOM_TOOLS)

@ -41,9 +41,16 @@ SET(OVQT_CORE_PLUGIN_RCS core.qrc)
SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTGUI TRUE)
SET(QT_USE_QTOPENGL TRUE) SET(QT_USE_QTOPENGL TRUE)
IF(WITH_QT5)
SET(CMAKE_AUTOMOC OFF)
QT5_ADD_RESOURCES(OVQT_CORE_PLUGIN_RC_SRCS ${OVQT_CORE_PLUGIN_RCS})
QT5_WRAP_CPP(OVQT_CORE_PLUGIN_MOC_SRC ${OVQT_CORE_PLUGIN_HDR})
QT5_WRAP_UI(OVQT_CORE_PLUGIN_UI_HDRS ${OVQT_CORE_PLUGIN_UIS})
ELSE(WITH_QT5)
QT4_ADD_RESOURCES(OVQT_CORE_PLUGIN_RC_SRCS ${OVQT_CORE_PLUGIN_RCS}) QT4_ADD_RESOURCES(OVQT_CORE_PLUGIN_RC_SRCS ${OVQT_CORE_PLUGIN_RCS})
QT4_WRAP_CPP(OVQT_CORE_PLUGIN_MOC_SRC ${OVQT_CORE_PLUGIN_HDR}) QT4_WRAP_CPP(OVQT_CORE_PLUGIN_MOC_SRC ${OVQT_CORE_PLUGIN_HDR})
QT4_WRAP_UI(OVQT_CORE_PLUGIN_UI_HDRS ${OVQT_CORE_PLUGIN_UIS}) QT4_WRAP_UI(OVQT_CORE_PLUGIN_UI_HDRS ${OVQT_CORE_PLUGIN_UIS})
ENDIF(WITH_QT5)
SOURCE_GROUP(QtResources FILES ${OVQT_CORE_PLUGIN_UIS} ${OVQT_CORE_PLUGIN_RCS}) SOURCE_GROUP(QtResources FILES ${OVQT_CORE_PLUGIN_UIS} ${OVQT_CORE_PLUGIN_RCS})
SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_CORE_PLUGIN_UI_HDRS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_CORE_PLUGIN_UI_HDRS})
@ -53,7 +60,15 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
ADD_LIBRARY(studio_plugin_core SHARED ${SRC} ${OVQT_CORE_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_CORE_PLUGIN_RC_SRCS} ${OVQT_CORE_PLUGIN_UI_HDRS}) ADD_LIBRARY(studio_plugin_core SHARED ${SRC} ${OVQT_CORE_PLUGIN_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_CORE_PLUGIN_RC_SRCS} ${OVQT_CORE_PLUGIN_UI_HDRS})
TARGET_LINK_LIBRARIES(studio_plugin_core nelmisc nel3d ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(studio_plugin_core nelmisc nel3d)
IF(WITH_QT5)
TARGET_LINK_LIBRARIES(studio_plugin_core
Qt5::Widgets)
ELSE(WITH_QT5)
TARGET_LINK_LIBRARIES(studio_plugin_core
${QT_LIBRARIES})
ENDIF(WITH_QT5)
NL_DEFAULT_PROPS(studio_plugin_core "Tools: Studio Plugin: Core") NL_DEFAULT_PROPS(studio_plugin_core "Tools: Studio Plugin: Core")
NL_ADD_RUNTIME_FLAGS(studio_plugin_core) NL_ADD_RUNTIME_FLAGS(studio_plugin_core)

@ -63,7 +63,7 @@ void Nel3DWidget::init()
nlassert( driver == NULL ); nlassert( driver == NULL );
driver = NL3D::UDriver::createDriver( 0, false, 0 ); driver = NL3D::UDriver::createDriver( 0, false, 0 );
driver->setDisplay( winId(), NL3D::UDriver::CMode( width(), height(), 32, true ) ); driver->setDisplay( (nlWindow)winId(), NL3D::UDriver::CMode( width(), height(), 32, true ) );
} }
void Nel3DWidget::createTextContext( std::string fontFile ) void Nel3DWidget::createTextContext( std::string fontFile )

@ -24,8 +24,8 @@
#include <nel/misc/debug.h> #include <nel/misc/debug.h>
// Qt includes // Qt includes
#include <QtGui/QTabWidget> #include <QTabWidget>
#include <QtGui/QGridLayout> #include <QGridLayout>
namespace Core namespace Core
{ {

@ -22,7 +22,7 @@
#include "core_global.h" #include "core_global.h"
// Qt includes // Qt includes
#include <QtCore/QObject> #include <QObject>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QTabWidget; class QTabWidget;

@ -19,7 +19,7 @@
#ifndef CORE_GLOBAL_H #ifndef CORE_GLOBAL_H
#define CORE_GLOBAL_H #define CORE_GLOBAL_H
#include <QtCore/qglobal.h> #include <qglobal.h>
#if defined(CORE_LIBRARY) #if defined(CORE_LIBRARY)
# define CORE_EXPORT Q_DECL_EXPORT # define CORE_EXPORT Q_DECL_EXPORT

@ -27,12 +27,12 @@
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
// Qt includes // Qt includes
#include <QtCore/QObject> #include <QObject>
#include <QtGui/QMessageBox> #include <QMessageBox>
#include <QtGui/QMainWindow> #include <QMainWindow>
#include <QtGui/QMenu> #include <QMenu>
#include <QtGui/QAction> #include <QAction>
#include <QtGui/QMenuBar> #include <QMenuBar>
using namespace Core; using namespace Core;
@ -101,4 +101,4 @@ void CorePlugin::addAutoReleasedObject(QObject *obj)
m_autoReleaseObjects.prepend(obj); m_autoReleaseObjects.prepend(obj);
} }
Q_EXPORT_PLUGIN(CorePlugin) // Q_EXPORT_PLUGIN(CorePlugin)

@ -23,7 +23,7 @@
#include "nel/misc/app_context.h" #include "nel/misc/app_context.h"
#include <QtCore/QObject> #include <QObject>
namespace NLMISC namespace NLMISC
{ {
@ -41,6 +41,7 @@ namespace Core
class CorePlugin : public QObject, public ExtensionSystem::IPlugin class CorePlugin : public QObject, public ExtensionSystem::IPlugin
{ {
Q_OBJECT Q_OBJECT
Q_PLUGIN_METADATA(IID NL_STUDIO_IPLUGIN_IID)
Q_INTERFACES(ExtensionSystem::IPlugin) Q_INTERFACES(ExtensionSystem::IPlugin)
public: public:

@ -24,12 +24,12 @@
#include <nel/misc/path.h> #include <nel/misc/path.h>
// Qt includes // Qt includes
#include <QtCore/QSettings> #include <QSettings>
#include <QtGui/QWidget> #include <QWidget>
#include <QtGui/QMessageBox> #include <QMessageBox>
#include <QtGui/QFileDialog> #include <QFileDialog>
#include <QtGui/QStyleFactory> #include <QStyleFactory>
#include <QtGui/QStyle> #include <QStyle>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"

@ -19,7 +19,7 @@
#ifndef GENERAL_SETTINGS_PAGE_H #ifndef GENERAL_SETTINGS_PAGE_H
#define GENERAL_SETTINGS_PAGE_H #define GENERAL_SETTINGS_PAGE_H
#include <QtCore/QObject> #include <QObject>
#include "ioptions_page.h" #include "ioptions_page.h"

@ -22,9 +22,9 @@
#include "core_global.h" #include "core_global.h"
// Qt includes // Qt includes
#include <QtCore/QObject> #include <QObject>
#include <QtCore/QString> #include <QString>
#include <QtGui/QIcon> #include <QIcon>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QWidget; class QWidget;

@ -21,7 +21,7 @@
#include "core_global.h" #include "core_global.h"
#include <QtCore/QObject> #include <QObject>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QMainWindow; class QMainWindow;

@ -23,7 +23,7 @@
#include "core_global.h" #include "core_global.h"
// Qt includes // Qt includes
#include <QtCore/QObject> #include <QObject>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QWidget; class QWidget;

@ -23,7 +23,7 @@
#include "core_global.h" #include "core_global.h"
// Qt includes // Qt includes
#include <QtCore/QObject> #include <QObject>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QWidget; class QWidget;

@ -29,9 +29,14 @@
#include <nel/misc/debug.h> #include <nel/misc/debug.h>
// Qt includes // Qt includes
#include <QtCore/QCoreApplication> #include <QCoreApplication>
#include <QtGui/QUndoView> #include <QUndoView>
#include <QtGui/QtGui> #include <QtGui>
#include <QMessageBox>
#include <QDockWidget>
#include <QStatusBar>
#include <QUndoGroup>
#include <QUndoStack>
namespace Core namespace Core
{ {

@ -25,9 +25,9 @@
// STL includes // STL includes
// Qt includes // Qt includes
#include <QtGui/QMainWindow> #include <QMainWindow>
#include <QtGui/QUndoGroup> #include <QUndoGroup>
#include <QtCore/QSettings> #include <QSettings>
namespace Core namespace Core
{ {

@ -22,12 +22,12 @@
#include "core_global.h" #include "core_global.h"
// Qt includes // Qt includes
#include <QtCore/QHash> #include <QHash>
#include <QtCore/QObject> #include <QObject>
#include <QtCore/QList> #include <QList>
#include <QtGui/QMenu> #include <QMenu>
#include <QtGui/QAction> #include <QAction>
#include <QtGui/QMenuBar> #include <QMenuBar>
namespace Core namespace Core
{ {

@ -21,10 +21,10 @@
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
// Qt includes // Qt includes
#include <QtCore/QDir> #include <QDir>
#include <QtGui/QIcon> #include <QIcon>
#include <QtGui/QStyle> #include <QStyle>
#include <QtGui/QTreeWidgetItem> #include <QTreeWidgetItem>
#include <QMessageBox> #include <QMessageBox>
#include <QFileDialog> #include <QFileDialog>

@ -20,8 +20,8 @@
#include "ui_plugin_view_dialog.h" #include "ui_plugin_view_dialog.h"
#include <QtCore/QMap> #include <QMap>
#include <QtCore/QStringList> #include <QStringList>
namespace ExtensionSystem namespace ExtensionSystem
{ {

@ -24,9 +24,9 @@
#include <nel/misc/path.h> #include <nel/misc/path.h>
// Qt includes // Qt includes
#include <QtCore/QSettings> #include <QSettings>
#include <QtGui/QWidget> #include <QWidget>
#include <QtGui/QFileDialog> #include <QFileDialog>
namespace Core namespace Core
{ {

@ -19,7 +19,7 @@
#ifndef SEARCH_PATHS_SETTINGS_PAGE_H #ifndef SEARCH_PATHS_SETTINGS_PAGE_H
#define SEARCH_PATHS_SETTINGS_PAGE_H #define SEARCH_PATHS_SETTINGS_PAGE_H
#include <QtCore/QObject> #include <QObject>
#include "ioptions_page.h" #include "ioptions_page.h"

@ -21,8 +21,8 @@
#include "ioptions_page.h" #include "ioptions_page.h"
// Qt includes // Qt includes
#include <QtGui/QHeaderView> #include <QHeaderView>
#include <QtGui/QPushButton> #include <QPushButton>
struct PageData struct PageData
{ {

@ -22,7 +22,7 @@
#include "../core/ui_settings_dialog.h" #include "../core/ui_settings_dialog.h"
// Qt includes // Qt includes
#include <QtCore/QList> #include <QList>
// Project includes // Project includes
#include "../../extension_system/iplugin_manager.h" #include "../../extension_system/iplugin_manager.h"

Loading…
Cancel
Save