From aa590765e003ef28129052c52ec1bd811d8183ea Mon Sep 17 00:00:00 2001 From: Shinya Kitaoka Date: Apr 22 2016 07:19:06 +0000 Subject: keep codes for QTBUG-48288 --- diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt index 39b0512..29ba673 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.cpp index b2cce3c..4553e99 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(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);