Changed: #1193 Update PCH. Example plugins correct works under Linux.

hg/feature/sound
dnk-88 14 years ago
parent 0becdd2252
commit 6ec8ebab4b

@ -41,10 +41,6 @@ ADD_DEFINITIONS(-DQT_NO_KEYWORDS ${LIBXML2_DEFINITIONS} ${QT_DEFINITIONS})
NL_DEFAULT_PROPS(object_viewer_qt "NeL, Tools, 3D: Object Viewer Qt") NL_DEFAULT_PROPS(object_viewer_qt "NeL, Tools, 3D: Object Viewer Qt")
NL_ADD_RUNTIME_FLAGS(object_viewer_qt) NL_ADD_RUNTIME_FLAGS(object_viewer_qt)
IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(object_viewer_qt ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
ENDIF(WITH_PCH)
ADD_SUBDIRECTORY(plugins) ADD_SUBDIRECTORY(plugins)
INSTALL(TARGETS object_viewer_qt RUNTIME DESTINATION bin COMPONENT runtime BUNDLE DESTINATION /Applications) INSTALL(TARGETS object_viewer_qt RUNTIME DESTINATION bin COMPONENT runtime BUNDLE DESTINATION /Applications)

@ -15,7 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "sheet_id_view.h" #include "sheet_id_view.h"
#include "ui_dialog.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
@ -58,7 +57,7 @@ void SheetIdView::pushToTable()
NLMISC::CSheetId::init(false); NLMISC::CSheetId::init(false);
NLMISC::CSheetId::buildIdVector(m_sheetList); NLMISC::CSheetId::buildIdVector(m_sheetList);
CPred Pred; CPred Pred;
sort(m_sheetList.begin(), m_sheetList.end(), Pred); std::sort(m_sheetList.begin(), m_sheetList.end(), Pred);
// Fill table // Fill table
m_ui.table->clear(); m_ui.table->clear();
@ -66,7 +65,6 @@ void SheetIdView::pushToTable()
m_ui.table->setColumnCount(2); m_ui.table->setColumnCount(2);
for (size_t i = 0; i < m_sheetList.size(); i++) for (size_t i = 0; i < m_sheetList.size(); i++)
{ {
QApplication::processEvents();
QTableWidgetItem* item1 = new QTableWidgetItem(QString(m_sheetList[i].toString().c_str())); QTableWidgetItem* item1 = new QTableWidgetItem(QString(m_sheetList[i].toString().c_str()));
QTableWidgetItem* item2 = new QTableWidgetItem(QString("%1").arg(m_sheetList[i].asInt())); QTableWidgetItem* item2 = new QTableWidgetItem(QString("%1").arg(m_sheetList[i].asInt()));
m_ui.table->setItem(i,1,item1); m_ui.table->setItem(i,1,item1);

@ -30,7 +30,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
ADD_LIBRARY(ovqt_plugin_example MODULE ${SRC} ${OVQT_PLUG_EXAMPLE_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_EXAMPLE_UI_HDRS}) ADD_LIBRARY(ovqt_plugin_example MODULE ${SRC} ${OVQT_PLUG_EXAMPLE_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_EXAMPLE_UI_HDRS})
TARGET_LINK_LIBRARIES(ovqt_plugin_example ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES}) TARGET_LINK_LIBRARIES(ovqt_plugin_example ovqt_plugin_core nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY})
NL_DEFAULT_PROPS(ovqt_plugin_example "NeL, Tools, 3D: Object Viewer Qt Plugin: Example") NL_DEFAULT_PROPS(ovqt_plugin_example "NeL, Tools, 3D: Object Viewer Qt Plugin: Example")
NL_ADD_RUNTIME_FLAGS(ovqt_plugin_example) NL_ADD_RUNTIME_FLAGS(ovqt_plugin_example)

@ -33,7 +33,7 @@ namespace NLQT
{ {
QNLWidget::QNLWidget(QWidget *parent) QNLWidget::QNLWidget(QWidget *parent)
: QWidget(parent), : QNeLWidget(parent),
m_driver(NULL), m_driver(NULL),
m_initialized(false), m_initialized(false),
m_interval(25) m_interval(25)
@ -42,6 +42,9 @@ QNLWidget::QNLWidget(QWidget *parent)
setFocusPolicy(Qt::StrongFocus); setFocusPolicy(Qt::StrongFocus);
init(); init();
#ifdef Q_OS_LINUX
makeCurrent();
#endif
m_mainTimer = new QTimer(this); m_mainTimer = new QTimer(this);
connect(m_mainTimer, SIGNAL(timeout()), this, SLOT(updateRender())); connect(m_mainTimer, SIGNAL(timeout()), this, SLOT(updateRender()));
} }

@ -29,6 +29,15 @@
class QAction; class QAction;
/* TODO every platform should use QWidget */
#if defined(NL_OS_WINDOWS)
typedef QWidget QNeLWidget;
#elif defined(NL_OS_MAC)
typedef QWidget QNeLWidget;
#elif defined(NL_OS_UNIX)
typedef QGLWidget QNeLWidget;
#endif // NL_OS_UNIX
namespace NL3D namespace NL3D
{ {
class UDriver; class UDriver;
@ -44,7 +53,7 @@ namespace NLQT
@details Automatically begins to update the render if the widget is visible @details Automatically begins to update the render if the widget is visible
or suspends the updating of render if the widget is hidden. or suspends the updating of render if the widget is hidden.
*/ */
class QNLWidget : public QWidget class QNLWidget : public QNeLWidget
{ {
Q_OBJECT Q_OBJECT

@ -146,6 +146,11 @@ TARGET_LINK_LIBRARIES(ovqt_plugin_object_viewer
${QT_QTOPENGL_LIBRARY}) ${QT_QTOPENGL_LIBRARY})
NL_DEFAULT_PROPS(ovqt_plugin_object_viewer "NeL, Tools, 3D: Object Viewer Qt Plugin: Object Viewer") NL_DEFAULT_PROPS(ovqt_plugin_object_viewer "NeL, Tools, 3D: Object Viewer Qt Plugin: Object Viewer")
IF(WITH_PCH)
ADD_NATIVE_PRECOMPILED_HEADER(ovqt_plugin_object_viewer ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/stdpch.cpp)
ENDIF(WITH_PCH)
NL_ADD_RUNTIME_FLAGS(ovqt_plugin_object_viewer) NL_ADD_RUNTIME_FLAGS(ovqt_plugin_object_viewer)
NL_ADD_LIB_SUFFIX(ovqt_plugin_object_viewer) NL_ADD_LIB_SUFFIX(ovqt_plugin_object_viewer)

Loading…
Cancel
Save