Merge pull request #2847 from shun-iwasawa/g/fix_crash_on_launch_without_viewer

Fix Crash on Launch without Viewer
This commit is contained in:
manongjohn 2019-10-22 19:13:21 -04:00 committed by GitHub
commit 9495927d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -233,7 +233,7 @@ project->setUseScenePath(TProject::Extras, false);
// Imposto la rootDir per ImageCache // Imposto la rootDir per ImageCache
/*-- TOONZCACHEROOTの設定 --*/ /*-- TOONZCACHEROOTの設定 --*/
TFilePath cacheDir = ToonzFolder::getCacheRootFolder(); TFilePath cacheDir = ToonzFolder::getCacheRootFolder();
if (cacheDir.isEmpty()) cacheDir = TEnv::getStuffDir() + "cache"; if (cacheDir.isEmpty()) cacheDir = TEnv::getStuffDir() + "cache";
TImageCache::instance()->setRootDir(cacheDir); TImageCache::instance()->setRootDir(cacheDir);
} }
@ -319,10 +319,10 @@ int main(int argc, char *argv[]) {
QApplication a(argc, argv); QApplication a(argc, argv);
#ifdef MACOSX #ifdef MACOSX
// This workaround is to avoid missing left button problem on Qt5.6.0. // This workaround is to avoid missing left button problem on Qt5.6.0.
// To invalidate m_rightButtonClicked in Qt/qnsview.mm, sending // To invalidate m_rightButtonClicked in Qt/qnsview.mm, sending
// NSLeftButtonDown event before NSLeftMouseDragged event propagated to // NSLeftButtonDown event before NSLeftMouseDragged event propagated to
// QApplication. See more details in ../mousedragfilter/mousedragfilter.mm. // QApplication. See more details in ../mousedragfilter/mousedragfilter.mm.
#include "mousedragfilter.h" #include "mousedragfilter.h"
@ -622,7 +622,8 @@ int main(int argc, char *argv[]) {
#ifdef _WIN32 #ifdef _WIN32
// http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows // http://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows
QWindowsWindowFunctions::setHasBorderInFullScreen(w.windowHandle(), true); if (w.windowHandle())
QWindowsWindowFunctions::setHasBorderInFullScreen(w.windowHandle(), true);
#endif #endif
splash.showMessage(offsetStr + "Loading style sheet ...", Qt::AlignCenter, splash.showMessage(offsetStr + "Loading style sheet ...", Qt::AlignCenter,