mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
min Qt 6.4
This commit is contained in:
parent
288a408bb0
commit
39f663aaaa
6 changed files with 5 additions and 32 deletions
|
|
@ -221,13 +221,7 @@ bool CardPictureLoader::hasCustomArt()
|
|||
// Check if there is at least one non-directory file in the pics path, other
|
||||
// than in the "downloadedPics" subdirectory.
|
||||
while (it.hasNext()) {
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0))
|
||||
QFileInfo dir(it.nextFileInfo());
|
||||
#else
|
||||
// nextFileInfo() is only available in Qt 6.3+, for previous versions, we build
|
||||
// the QFileInfo from a QString which requires more system calls.
|
||||
QFileInfo dir(it.next());
|
||||
#endif
|
||||
|
||||
if (it.fileName() == "downloadedPics")
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1441,12 +1441,7 @@ MessagesSettingsPage::MessagesSettingsPage()
|
|||
|
||||
void MessagesSettingsPage::updateColor(const QString &value)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
|
||||
QColor colorToSet = QColor::fromString("#" + value);
|
||||
#else
|
||||
QColor colorToSet;
|
||||
colorToSet.setNamedColor("#" + value);
|
||||
#endif
|
||||
if (colorToSet.isValid()) {
|
||||
SettingsCache::instance().setChatMentionColor(value);
|
||||
updateMentionPreview();
|
||||
|
|
@ -1455,12 +1450,7 @@ void MessagesSettingsPage::updateColor(const QString &value)
|
|||
|
||||
void MessagesSettingsPage::updateHighlightColor(const QString &value)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
|
||||
QColor colorToSet = QColor::fromString("#" + value);
|
||||
#else
|
||||
QColor colorToSet;
|
||||
colorToSet.setNamedColor("#" + value);
|
||||
#endif
|
||||
if (colorToSet.isValid()) {
|
||||
SettingsCache::instance().setChatHighlightColor(value);
|
||||
updateHighlightPreview();
|
||||
|
|
|
|||
|
|
@ -517,23 +517,13 @@ void ChatView::showSystemPopup(const QString &userName)
|
|||
|
||||
QColor ChatView::getCustomMentionColor()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
|
||||
QColor customColor = QColor::fromString("#" + SettingsCache::instance().getChatMentionColor());
|
||||
#else
|
||||
QColor customColor;
|
||||
customColor.setNamedColor("#" + SettingsCache::instance().getChatMentionColor());
|
||||
#endif
|
||||
return customColor.isValid() ? customColor : DEFAULT_MENTION_COLOR;
|
||||
}
|
||||
|
||||
QColor ChatView::getCustomHighlightColor()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 0))
|
||||
QColor customColor = QColor::fromString("#" + SettingsCache::instance().getChatMentionColor());
|
||||
#else
|
||||
QColor customColor;
|
||||
customColor.setNamedColor("#" + SettingsCache::instance().getChatMentionColor());
|
||||
#endif
|
||||
return customColor.isValid() ? customColor : DEFAULT_MENTION_COLOR;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue