diff --git src/gui/kernel/qapplication_mac.mm src/gui/kernel/qapplication_mac.mm
index 2a0aad49e1015e1edd3c891ee013e56e5ae44e05..3f40c1dcdc3d307f01ca8dfdee1ef37dee3192c6 100644
|
|
bool QApplicationPrivate::qt_mac_apply_settings() |
2941 | 2941 | QTextCodec::setCodecForTr(codec); |
2942 | 2942 | } |
2943 | 2943 | |
| 2944 | // this can probrably just as well go into the qt_is_gui_used if: |
| 2945 | // Fetch the default graphics system from the settings store. |
| 2946 | const QString defaultGraphicsSystem = settings.value(QLatin1String("DefaultGraphicsSystem")).toString(); |
| 2947 | if (! defaultGraphicsSystem.isNull() && ! defaultGraphicsSystem.isEmpty()) { |
| 2948 | QApplication::setGraphicsSystem(defaultGraphicsSystem); |
| 2949 | } |
| 2950 | |
2944 | 2951 | if (qt_is_gui_used) { |
2945 | 2952 | QString str; |
2946 | 2953 | QStringList strlist; |
diff --git tools/qtconfig/mainwindow.cpp tools/qtconfig/mainwindow.cpp
index 1bb6e4eae01fd43d9de41d627677abc8521908d8..e1726fb174c406311bf132d4f6c70ba3016a4c41 100644
|
|
MainWindow::MainWindow() |
227 | 238 | connect(ui->rtlExtensionsCheckBox, SIGNAL(toggled(bool)), SLOT(somethingModified())); |
228 | 239 | connect(ui->inputStyleCombo, SIGNAL(activated(int)), SLOT(somethingModified())); |
229 | 240 | connect(ui->inputMethodCombo, SIGNAL(activated(int)), SLOT(somethingModified())); |
| 241 | connect(ui->graphicsSystemCombo, SIGNAL(activated(int)), SLOT(somethingModified())); |
230 | 242 | connect(ui->guiStyleCombo, SIGNAL(activated(QString)), SLOT(styleSelected(QString))); |
231 | 243 | connect(ui->familySubstitutionCombo, SIGNAL(activated(QString)), SLOT(substituteSelected(QString))); |
232 | 244 | connect(ui->tunePaletteButton, SIGNAL(clicked()), SLOT(tunePalette())); |
… |
… |
MainWindow::MainWindow() |
416 | 463 | ui->inputMethodCombo->hide(); |
417 | 464 | ui->inputMethodLabel->hide(); |
418 | 465 | #endif |
419 | | |
| 466 | #ifdef Q_OS_MAC |
| 467 | ui->graphicsSystemCombo->setToolTip(tr("Select the graphicsssystem to be used by default.\n" |
| 468 | "Native: use native CoreGraphics rendering\n" |
| 469 | "Raster: use raster graphics\n" |
| 470 | "OpenGL: use OpenGL (experimental!)\n" |
| 471 | "Raster mode is the preferred default except on Mac OS 10.14 and newer where it causes flickering.\n" |
| 472 | "Use Native rendering on those newer OS versions (or if you experience other graphics glitches).")); |
| 473 | QStringList graphicsSystems; |
| 474 | QString defaultGraphicsSystem = settings.value(QLatin1String("DefaultGraphicsSystem"), QLatin1String("Native")).toString(); |
| 475 | |
| 476 | graphicsSystems << tr("Native") << tr("Raster") << tr("OpenGL"); |
| 477 | ui->graphicsSystemCombo->addItems(graphicsSystems); |
| 478 | ui->graphicsSystemCombo->setCurrentIndex(graphicsSystems.indexOf(QRegExp(defaultGraphicsSystem, Qt::CaseInsensitive))); |
| 479 | #else |
| 480 | ui->graphicsSystemLabel->hide(); |
| 481 | ui->graphicsSystemCombo->hide(); |
| 482 | #endif |
420 | 483 | ui->fontEmbeddingCheckBox->setChecked(settings.value(QLatin1String("embedFonts"), true) |
421 | 484 | .toBool()); |
422 | 485 | fontpaths = settings.value(QLatin1String("fontPath")).toStringList(); |
… |
… |
void MainWindow::fileSave() |
573 | 636 | #if defined(Q_WS_X11) && !defined(QT_NO_XIM) |
574 | 637 | settings.setValue(QLatin1String("DefaultInputMethod"), ui->inputMethodCombo->currentText()); |
575 | 638 | #endif |
| 639 | #ifdef Q_OS_MAC |
| 640 | settings.setValue(QLatin1String("DefaultGraphicsSystem"), ui->graphicsSystemCombo->currentText()); |
| 641 | #endif |
576 | 642 | |
577 | 643 | QString audioSink = settings.value(QLatin1String("audiosink"), QLatin1String("Auto")).toString(); |
578 | 644 | QString videoMode = settings.value(QLatin1String("videomode"), QLatin1String("Auto")).toString(); |
diff --git tools/qtconfig/mainwindow.ui tools/qtconfig/mainwindow.ui
index 454021ecdf2c00b29b9f2b86a2a68893da57b572..7593f7140b8ad73b1c615439dd4b473e37b3e9a7 100644
|
|
|
901 | 901 | </property> |
902 | 902 | </widget> |
903 | 903 | </item> |
| 904 | <item> |
| 905 | <widget class="QLabel" name="graphicsSystemLabel"> |
| 906 | <property name="text"> |
| 907 | <string>Default Graphics System:</string> |
| 908 | </property> |
| 909 | </widget> |
| 910 | </item> |
| 911 | <item> |
| 912 | <widget class="QComboBox" name="graphicsSystemCombo"> |
| 913 | <property name="currentIndex"> |
| 914 | <number>-1</number> |
| 915 | </property> |
| 916 | </widget> |
| 917 | </item> |
904 | 918 | <item> |
905 | 919 | <spacer> |
906 | 920 | <property name="orientation"> |