Skip to content

Commit f5fd326

Browse files
committed
Update to Qt6
1 parent 16b8901 commit f5fd326

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Section: admin
33
Priority: optional
44
Maintainer: fehlix <fehlix@mxlinux.org>
55
XSBC-Original-Maintainer: Adrian <adrian@mxlinux.org>
6-
Build-Depends: debhelper (>=10),
6+
Build-Depends: debhelper (>=10), qt6-base-dev, qt6-base-dev-tools, qt6-tools-dev, qt6-tools-dev-tools
77
qtbase5-dev,
88
qttools5-dev-tools
99
Standards-Version: 3.9.8

debian/rules

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
#!/usr/bin/make -f
2-
export QT_SELECT=5
2+
export QT_SELECT=6
33

44
QMAKE_OPTS = DEFINES+=NO_DEBUG_ON_CONSOLE
5-
MAKE_OPTS = QMAKE=qmake-qt5 LRELEASE=lrelease-qt5 QMAKE_OPTS="$(QMAKE_OPTS)"
5+
MAKE_OPTS = QMAKE=qmake6 QMAKE_OPTS="$(QMAKE_OPTS)"
6+
7+
override_dh_auto_configure:
8+
qmake6
69

710
override_dh_auto_clean:
811
dh_auto_clean
912
rm -f src/translations/*.qm
1013

1114
override_dh_auto_build:
12-
lrelease translations/*.ts
15+
/usr/lib/qt6/bin/lrelease translations/*.ts
1316
head -n1 debian/changelog | sed -e "s/.*(\([^(]*\)).*/const QString VERSION {\"\1\"};/" > version.h
1417
dh_auto_build -- $(MAKE_OPTS)
1518

@@ -20,4 +23,4 @@ override_dh_shlibdeps:
2023
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
2124

2225
%:
23-
dh $@ --no-automatic-dbgsym --parallel
26+
dh $@ --no-automatic-dbgsym --parallel

main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ int main(int argc, char *argv[])
105105
QApplication::setApplicationVersion(VERSION);
106106

107107
QTranslator qtTran;
108-
if (qtTran.load("qt_" + QLocale().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
108+
if (qtTran.load("qt_" + QLocale().name(), QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
109109
QApplication::installTranslator(&qtTran);
110110
}
111111

112112
QTranslator qtBaseTran;
113-
if (qtBaseTran.load("qtbase_" + QLocale().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
113+
if (qtBaseTran.load("qtbase_" + QLocale().name(), QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
114114
QApplication::installTranslator(&qtBaseTran);
115115
}
116116

mainwindow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void MainWindow::parseContent()
178178
if (color_item == "default_color") {
179179
colorWidget = ui->widgetDefaultColor;
180180
} else if (color_item.startsWith("color")) {
181-
const int index = color_item.midRef(5).toInt(); // Extract the number from "colorX";
181+
const int index = color_item.mid(5).toInt(); // Extract the number from "colorX";
182182

183183
colorWidget = ui->groupBoxColors->findChild<QWidget *>(QString("widgetColor%1").arg(index));
184184
if (colorWidget) {

0 commit comments

Comments
 (0)