OpenToonz - An open-source full-featured 2D animation creation software
C
keep codes for QTBUG-48288
Shinya Kitaokaaa590765e003
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txtindex 39b051270..29ba673c8 100644--- a/toonz/sources/CMakeLists.txt+++ b/toonz/sources/CMakeLists.txt@@ -14,7 +14,11 @@ message("Thirdpary Library Search path:" ${THIRDPARTY_LIBS_HINTS})if (WIN32)message("Windows System")- set(QT_PATH "C:/Qt/Qt5.6.0/5.6/msvc2013_64" CACHE PATH "Qt instlattion directory")+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)+ set(QT_PATH "C:/Qt/Qt5.6.0_32/5.6/msvc2013" CACHE PATH "Qt instlattion directory")+ else()+ set(QT_PATH "C:/Qt/Qt5.6.0/5.6/msvc2013_64" CACHE PATH "Qt instlattion directory")+ endif()if(NOT EXISTS ${QT_PATH})message("Specify QT_PATH properly")return()@@ -33,7 +37,6 @@ elseif (APPLE)set(QT_LIB_PATH ${QT_PATH})set(CMAKE_PREFIX_PATH "${QT_PATH}cmake/")-message("CMAKE_PREFIX_PATH:" ${CMAKE_PREFIX_PATH})add_definitions(-DMACOSX -Di386)set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -std=c++11 -stdlib=libc++ -fno-implicit-templates")diff --git a/toonz/sources/toonz/comboviewerpane.cpp b/toonz/sources/toonz/comboviewerpane.cppindex b2cce3c39..4553e9925 100644--- a/toonz/sources/toonz/comboviewerpane.cpp+++ b/toonz/sources/toonz/comboviewerpane.cpp@@ -105,6 +105,16 @@ ComboViewerPanel::ComboViewerPanel(QWidget *parent, Qt::WFlags flags)ImageUtils::FullScreenWidget *fsWidget = new ImageUtils::FullScreenWidget(this);fsWidget->setWidget(m_sceneViewer = new SceneViewer(fsWidget));+#if defined(Q_OS_WIN) && (QT_VERSION >= 0x050500) && (QT_VERSION < 0x050600)+ // Workaround for QTBUG-48288+ // This code should be removed after updating Qt.+ // Qt may crash in handling WM_SIZE of m_sceneViewer in splash.finish(&w)+ // in main.cpp. To suppress sending WM_SIZE, set window position here.+ // WM_SIZE will not be sent if window poistion is not changed.+ ::SetWindowPos(reinterpret_cast<HWND>(m_sceneViewer->winId()),+ HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);+#endif+m_vRuler = new Ruler(this, m_sceneViewer, true);m_hRuler = new Ruler(this, m_sceneViewer, false);