From 1ddbd69af15d02af232925cd61527eba152305f0 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 6 Jan 2016 16:01:53 +0100 Subject: [PATCH 1/5] Fixed: Compilation with Qt 4 --- code/nel/tools/3d/tile_edit_qt/tiles_model.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp b/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp index cbe6e05a1..d05495eb7 100644 --- a/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp +++ b/code/nel/tools/3d/tile_edit_qt/tiles_model.cpp @@ -60,7 +60,11 @@ QVariant tiles_model::data(const QModelIndex &index, int role) const { CTile_Widget wiwi; wiwi.initWidget(tiles.value(index.row()).getPixmap(), tiles.value(index.row()).getPixmapSide(), tiles.value(index.row()).getTileLabel()); +#ifdef USE_QT5 QPixmap pixpix = wiwi.grab(wiwi.contentsRect()); +#else + QPixmap::grabWidget(wiwi, wiwi.contentsRect()); +#endif return pixpix; } else if (role == Qt::UserRole + 1) From 6ac293c8487a85e70bfb900370132d581d8dfc08 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 6 Jan 2016 16:03:04 +0100 Subject: [PATCH 2/5] Fixed: Warnings with GCC --- code/ryzom/server/src/ai_share/ai_event.h | 3 +- .../screenshot_islands.cpp | 29 +++++++++++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/code/ryzom/server/src/ai_share/ai_event.h b/code/ryzom/server/src/ai_share/ai_event.h index 267d0f456..c62b1be81 100644 --- a/code/ryzom/server/src/ai_share/ai_event.h +++ b/code/ryzom/server/src/ai_share/ai_event.h @@ -88,7 +88,8 @@ public: const CAIEventType &operator=(const CAIEventType &other) { _val=other._val; - } + return *this; + } bool operator==(const CAIEventType &other) const { return _val==other._val; diff --git a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp index 617605399..0cf9686b5 100644 --- a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp +++ b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp @@ -844,6 +844,7 @@ void CScreenshotIslands::processProximityBuffer(TBuffer & inputBuffer, uint32 li bool lastValue = false; CVector2f firstPixelBorder; + firstPixelBorder.set(0.f, 0.f); uint32 nbPixelsBorder = 0; for (uint32 x=0;x Date: Wed, 6 Jan 2016 16:03:20 +0100 Subject: [PATCH 3/5] Fixed: Compilation --- .../mission_manager/missions_commands.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp b/code/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp index 8844f0484..ef0ffa25b 100644 --- a/code/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp +++ b/code/ryzom/server/src/entities_game_service/mission_manager/missions_commands.cpp @@ -1067,7 +1067,7 @@ NLMISC_COMMAND(accessPowo, "give access to the powo", " player_name number" uint16 ownerId = buildingPlayer->getOwnerIdx( entityBase->getId() ); sint32 cell; buildingPlayer->addUser(c, 0, ownerId, cell); - c->setPowoCell(cell); +// c->setPowoCell(cell); CBuildingManager::getInstance()->setRoomLifeTime(cell, TGameCycle(NLMISC::TGameTime(4*60*60) / CTickEventHandler::getGameTimeStep())); log.displayNL("%d", cell); } @@ -1098,7 +1098,7 @@ NLMISC_COMMAND(slide, "slide to the powo", " x y cell [z] [h]") sint32 x; sint32 y; - sint32 cell = c->getPowoCell(); + sint32 cell = 0; // c->getPowoCell(); sint32 z = 0; float h = 0; From 98041d381a04062f09d96cd4accfd5fb8e1e20f8 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 6 Jan 2016 16:03:39 +0100 Subject: [PATCH 4/5] Changed: Minor changes --- code/ryzom/server/src/ai_share/ai_event.h | 20 +++++++++---------- .../screenshot_islands.cpp | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/code/ryzom/server/src/ai_share/ai_event.h b/code/ryzom/server/src/ai_share/ai_event.h index c62b1be81..55f179861 100644 --- a/code/ryzom/server/src/ai_share/ai_event.h +++ b/code/ryzom/server/src/ai_share/ai_event.h @@ -65,7 +65,7 @@ public: { *this=other; } - + CAIEventType(const char *typeName) { // copy text from input string to _val variable @@ -75,7 +75,7 @@ public: // if type name is longer than 8 characters it won't fit in an int64! nlassert(typeName[i]==0); - + // pad out _val variable with 0s while(i<8) ((char *)&_val)[i++]=0; @@ -134,7 +134,7 @@ private: // base class IAIEvent //----------------------------------------------------------------------------------- // This is the base class for classes of event sent from the game dev services to -// the AI. Note that the serial has a special syntax to allow for skipping of +// the AI. Note that the serial has a special syntax to allow for skipping of // unrecognised events. class IAIEvent @@ -174,7 +174,7 @@ public: // note serial should serialise: // the 'read' version of the serial should test the to ensure version robustness virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream); - + public: /// the stunned creature id NLMISC::CEntityId CreatureId; @@ -200,7 +200,7 @@ public: // note serial should serialise: // the 'read' version of the serial should test the to ensure version robustness virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream); - + public: /// the waked creature id NLMISC::CEntityId CreatureId; @@ -228,7 +228,7 @@ public: // note serial should serialise: // the 'read' version of the serial should test the to ensure version robustness virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream); - + public: /// the creature Id NLMISC::CEntityId CreatureId; @@ -260,7 +260,7 @@ public: // note serial should serialise: // the 'read' version of the serial should test the to ensure version robustness virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream); - + public: /// the affected creature id NLMISC::CEntityId CreatureId; @@ -292,7 +292,7 @@ public: // note serial should serialise: // the 'read' version of the serial should test the to ensure version robustness virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream); - + public: /// the creature id NLMISC::CEntityId CreatureId; @@ -318,7 +318,7 @@ public: // note serial should serialise: // the 'read' version of the serial should test the to ensure version robustness virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream); - + public: /// the creature id NLMISC::CEntityId CreatureId; @@ -343,7 +343,7 @@ public: // note serial should serialise: // the 'read' version of the serial should test the to ensure version robustness virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream); - + public: /// the affected creature id NLMISC::CEntityId CreatureId; diff --git a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp index 0cf9686b5..cd0e4581c 100644 --- a/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp +++ b/code/ryzom/tools/client/r2_islands_textures/screenshot_islands.cpp @@ -1773,7 +1773,6 @@ void CScreenshotIslands::buildBackTextureHLS(const std::string & islandName, con } } - // HLS order list< CRGBA > sortedHLS; list< CRGBA >::iterator itCol, itHLS; From 913102bc7c0785fed308638b14641efaf3b76d4f Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 6 Jan 2016 16:05:36 +0100 Subject: [PATCH 5/5] Changed: Link to Qt5WinExtras under Windows --- code/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index ae2b7257f..1e82448fd 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -238,6 +238,10 @@ IF(WITH_QT5) FIND_PACKAGE(Qt5LinguistTools) FIND_PACKAGE(Qt5Network) + IF(WIN32) + FIND_PACKAGE(Qt5WinExtras) + ENDIF() + IF(QT_STATIC) ADD_DEFINITIONS(-DQT_STATICPLUGIN) @@ -246,6 +250,10 @@ IF(WITH_QT5) # Gui SET(QT_LIBRARIES ${QT_LIBRARIES} Qt5::Gui Qt5::OpenGL) + IF(WIN32) + SET(QT_LIBRARIES ${QT_LIBRARIES} Qt5::WinExtras) + ENDIF() + ADD_QT_LIBRARY(PrintSupport) IF(WIN32)