#include "ConverterCache.h"
#include "FontEnums.h"
#include "FuncRequest.h"
-#include "KeyMap.h"
#include "KeySequence.h"
#include "Language.h"
#include "LyXAction.h"
#include "support/os.h"
#include "support/Package.h"
-#include "graphics/GraphicsTypes.h"
-
#include "frontends/alert.h"
#include "frontends/Application.h"
#include "frontends/FontLoader.h"
toqstr(makeRelPath(qstring_to_ucs4(outname), qstring_to_ucs4(relpath)));
QString testname = reloutname;
+#if QT_VERSION < 0x060000
testname.remove(QRegExp("^(\\.\\./)+"));
+#else
+ testname.remove(QRegularExpression("^(\\.\\./)+"));
+#endif
if (testname.contains("/"))
return outname;
}
-bool PrefColors::setColor(int const row, QColor const new_color,
- QString const old_color)
+bool PrefColors::setColor(int const row, QColor const & new_color,
+ QString const & old_color)
{
if (new_color.isValid() && new_color.name() != old_color) {
newcolors_[size_t(row)] = new_color.name();
}
-bool PrefColors::isDefaultColor(int const row, QString const color)
+bool PrefColors::isDefaultColor(int const row, QString const & color)
{
return color == getDefaultColorByRow(row).name();
}
QColor PrefColors::getDefaultColorByRow(int const row)
{
ColorSet const defaultcolor;
- return defaultcolor.getX11HexName(lcolors_[size_t(row)]).c_str();
+ return defaultcolor.getX11HexName(lcolors_[size_t(row)],
+ guiApp->colorCache().isDarkMode()).c_str();
}
startCommandED->setValidator(new NoNewLineValidator(startCommandED));
endCommandED->setValidator(new NoNewLineValidator(endCommandED));
+#if QT_VERSION < 0x060000
defaultDecimalSepED->setValidator(new QRegExpValidator(QRegExp("\\S"), this));
+#else
+ defaultDecimalSepED->setValidator(new QRegularExpressionValidator(QRegularExpression("\\S"), this));
+#endif
defaultDecimalSepED->setMaxLength(1);
defaultLengthUnitCO->addItem(lyx::qt_(unit_name_gui[Length::CM]), Length::CM);
index.data(Qt::UserRole).toString());
}
uiLanguageCO->blockSignals(false);
+
+ // FIXME: restore this when it works (see discussion in #6450).
+ respectOSkbdCB->hide();
}
iconSetCO->addItem(qt_("Classic"), "classic");
iconSetCO->addItem(qt_("Oxygen"), "oxygen");
-#if (!(defined Q_WS_X11 || defined(QPA_XCB)) || QT_VERSION < 0x040600)
- useSystemThemeIconsCB->hide();
+#if QT_VERSION >= 0x040600
+ if (guiApp->platformName() != "qt4x11"
+ && guiApp->platformName() != "xcb"
+ && !guiApp->platformName().contains("wayland"))
#endif
+ useSystemThemeIconsCB->hide();
}
}
-Dialog * createGuiPreferences(GuiView & lv) { return new GuiPreferences(lv); }
-
-
} // namespace frontend
} // namespace lyx