From d959bf15823cd0406cb5a8e00d4baaa0a7697ea2 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Wed, 31 Mar 2021 10:26:27 -0500 Subject: [PATCH] [Main] Remove deprecated Qt < 5.9 code --- src/Main/FreeCADGuiPy.cpp | 2 -- src/Main/MainGui.cpp | 9 --------- 2 files changed, 11 deletions(-) diff --git a/src/Main/FreeCADGuiPy.cpp b/src/Main/FreeCADGuiPy.cpp index 4dc09165fe..83ef7a2def 100644 --- a/src/Main/FreeCADGuiPy.cpp +++ b/src/Main/FreeCADGuiPy.cpp @@ -106,9 +106,7 @@ FreeCADGui_showMainWindow(PyObject * /*self*/, PyObject *args) std::thread t([]() { static int argc = 0; static char **argv = {0}; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) QApplication::setAttribute(Qt::AA_ShareOpenGLContexts); -#endif // This only works well if the QApplication is the very first created instance // of a QObject. Otherwise the application lives in a different thread than the // main thread which will cause hazardous behaviour. diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp index f468228d15..ebdfe64f7d 100644 --- a/src/Main/MainGui.cpp +++ b/src/Main/MainGui.cpp @@ -120,13 +120,6 @@ int main( int argc, char ** argv ) // Make sure to setup the Qt locale system before setting LANG and LC_ALL to C. // which is needed to use the system locale settings. (void)QLocale::system(); -#if QT_VERSION < 0x050000 - // http://www.freecadweb.org/tracker/view.php?id=399 - // Because of setting LANG=C the Qt automagic to use the correct encoding - // for file names is broken. This is a workaround to force the use of UTF-8 encoding - QFile::setEncodingFunction(myEncoderFunc); - QFile::setDecodingFunction(myDecoderFunc); -#endif // See https://forum.freecadweb.org/viewtopic.php?f=18&t=20600 // See Gui::Application::runApplication() putenv("LC_NUMERIC=C"); @@ -189,9 +182,7 @@ int main( int argc, char ** argv ) App::Application::Config()["SplashTextColor" ] = "#ffffff"; // white App::Application::Config()["SplashInfoColor" ] = "#c8c8c8"; // light grey -#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) QGuiApplication::setDesktopFileName(QStringLiteral("org.freecadweb.FreeCAD.desktop")); -#endif try { // Init phase ===========================================================