From af6b3f6312e2f1b39549a579738b8670cf500d2e Mon Sep 17 00:00:00 2001 From: Alex Fikl Date: Sat, 27 Apr 2024 21:33:40 +0300 Subject: [PATCH] Port deprecated Qt enum (#72) * ci: turn on -Wall with qmake * porting: from deprecated QPalette::Background --- .github/workflows/ci.yml | 2 +- app/logtextedit.cpp | 2 +- qtikz.pro | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 329bd07..487b693 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: - name: Build QTikZ run: | mkdir -p build-qt5-ubuntu && cd build-qt5-ubuntu - QT_SELECT=5 qmake ../qtikz.pro + QT_SELECT=5 qmake -Wall -Wdeprecated ../qtikz.pro QT_SELECT=5 make -j4 linux-kde: diff --git a/app/logtextedit.cpp b/app/logtextedit.cpp index c1ab3e5..277a509 100644 --- a/app/logtextedit.cpp +++ b/app/logtextedit.cpp @@ -64,7 +64,7 @@ void LogTextEdit::setLogPalette(bool runFailed) moveCursor(QTextCursor::End); if (runFailed) { QPalette failedPalette(QApplication::palette()); - failedPalette.setColor(QPalette::Background, QColor(255, 102, 102)); + failedPalette.setColor(QPalette::Window, QColor(255, 102, 102)); setAutoFillBackground(true); setPalette(failedPalette); } else diff --git a/qtikz.pro b/qtikz.pro index e90cc33..0e21d91 100644 --- a/qtikz.pro +++ b/qtikz.pro @@ -7,6 +7,10 @@ APPNAME = qtikz APPEXENAME = qtikz APPVERSION = 0.13.2 +QMAKE_CXXFLAGS += $$(CXXFLAGS) +QMAKE_CFLAGS += $$(CFLAGS) +QMAKE_LFLAGS += $$(LDFLAGS) + include(qmake/qtikzconfig.pri) include(qmake/qtikzdefaults.pri) include(qmake/qtikzmacros.pri)