Skip to content

Commit

Permalink
Delete unused QApt dependency & Only show System Update Button when w…
Browse files Browse the repository at this point in the history
…e are on Lingmo OS (#35)

* Only show updator when on Lingmo OS

* Fix

* Add Q_INVOKABLE

* Fix function name

* * Only show System Update Button when we are on LingmoOS
  * Delete unused QApt dependency
  • Loading branch information
elysia-best authored Oct 18, 2024
1 parent 1cfb2bd commit 52a7f9d
Show file tree
Hide file tree
Showing 55 changed files with 167 additions and 440 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@ obj-*linux-gnu/
/.idea/modules.xml
/.idea/QtSettings.xml
/.idea/vcs.xml

/.cache/
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ find_package(Libcrypt REQUIRED)
find_package(KF5NetworkManagerQt REQUIRED)
find_package(KF5ModemManagerQt REQUIRED)
find_package(KF5Config)
find_package(QApt REQUIRED)
# find_package(QtWebEngine REQUIRED)

pkg_search_module(FontConfig REQUIRED fontconfig IMPORTED_TARGET)
pkg_search_module(ICU REQUIRED icu-i18n)
Expand Down Expand Up @@ -64,11 +62,8 @@ target_link_libraries(${PROJECT_NAME}
Qt5::Xml
Qt5::X11Extras
Qt5::Concurrent
# Qt5::WebEngine
# ::Main

Qt5::Network
QApt::Main
# LingmoUI

KF5::NetworkManagerQt
KF5::ModemManagerQt
Expand All @@ -83,8 +78,6 @@ target_link_libraries(${PROJECT_NAME}
X11::X11
X11::Xi
X11::Xcursor

#
)

file(GLOB TS_FILES translations/*.ts)
Expand Down
10 changes: 9 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
lingmo-settings (3.0.0-rc1) unstable; urgency=high
lingmo-settings (3.0.0~rc2) UNRELEASED; urgency=low

[Elysia]
* Only show System Update Button when we are on LingmoOS
* Delete unused QApt dependency

-- Lingmo OS Team <[email protected]> Fri, 18 Oct 2024 19:26:23 +0800

lingmo-settings (3.0.0~rc1) unstable; urgency=high

[Lingmo OS Team]
* update ui
Expand Down
1 change: 0 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Build-Depends: cmake,
qtquickcontrols2-5-dev,
qttools5-dev,
qttools5-dev-tools,
libqapt-dev,
libpackagekitqt5-dev,
libkf5bluezqt-dev (>= 5.50.0~)
Standards-Version: 4.5.0
Expand Down
11 changes: 7 additions & 4 deletions src/about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ About::About(QObject *parent)

bool About::isLingmoOS()
{
if (!QFile::exists("/etc/lingmoos"))
return false;
return About::checkForLingmoOS();
}

QSettings settings("/etc/lingmoos", QSettings::IniFormat);
return settings.value("LingmoOS", false).toBool();
bool About::checkForLingmoOS() {
if (QFile::exists("/etc/lingmo_version"))
return true;
else
return false;
}

QString About::hostName()
Expand Down
1 change: 1 addition & 0 deletions src/about.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class About : public QObject
explicit About(QObject *parent = nullptr);

bool isLingmoOS();
Q_INVOKABLE bool checkForLingmoOS();

QString version();
QString hostName();
Expand Down
1 change: 1 addition & 0 deletions src/qml/About/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ ItemPage {
StandardButton {
text: ""
Layout.fillWidth: true
visible: about.checkForLingmoOS()
onClicked: {
about.openUpdator()
}
Expand Down
12 changes: 3 additions & 9 deletions translations/ar_AA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="312"/>
<location filename="../src/qml/About/Main.qml" line="313"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="328"/>
<location filename="../src/qml/About/Main.qml" line="329"/>
<source>Open Source Software Statement</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -720,7 +720,7 @@
<translation>إضافة مستخدم</translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="320"/>
<location filename="../src/qml/About/Main.qml" line="321"/>
<location filename="../src/qml/User/Main.qml" line="219"/>
<location filename="../src/qml/WLAN/Main.qml" line="99"/>
<source>→</source>
Expand Down Expand Up @@ -1257,12 +1257,6 @@
<translation>الفأرة</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="249"/>
<location filename="../src/qml/SideBar.qml" line="258"/>
<source>System &amp; Update</source>
<translation type="unfinished"></translation>
Expand Down
12 changes: 3 additions & 9 deletions translations/az_AZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="320"/>
<location filename="../src/qml/About/Main.qml" line="321"/>
<location filename="../src/qml/User/Main.qml" line="219"/>
<location filename="../src/qml/WLAN/Main.qml" line="99"/>
<source>→</source>
Expand Down Expand Up @@ -1059,12 +1059,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="312"/>
<location filename="../src/qml/About/Main.qml" line="313"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="328"/>
<location filename="../src/qml/About/Main.qml" line="329"/>
<source>Open Source Software Statement</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -1288,18 +1288,12 @@
<source>Power</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="253"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="249"/>
<location filename="../src/qml/SideBar.qml" line="258"/>
<source>System &amp; Update</source>
<translation type="unfinished"></translation>
Expand Down
12 changes: 3 additions & 9 deletions translations/be_BY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="312"/>
<location filename="../src/qml/About/Main.qml" line="313"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="328"/>
<location filename="../src/qml/About/Main.qml" line="329"/>
<source>Open Source Software Statement</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -724,7 +724,7 @@
<translation>Дадаць карыстальніка</translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="320"/>
<location filename="../src/qml/About/Main.qml" line="321"/>
<location filename="../src/qml/User/Main.qml" line="219"/>
<location filename="../src/qml/WLAN/Main.qml" line="99"/>
<source>→</source>
Expand Down Expand Up @@ -1324,18 +1324,12 @@
<source>Power</source>
<translation type="unfinished">Сілкаванне</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="253"/>
<source>About</source>
<translation>Аб сістэме</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="249"/>
<location filename="../src/qml/SideBar.qml" line="258"/>
<source>System &amp; Update</source>
<translation type="unfinished"></translation>
Expand Down
12 changes: 3 additions & 9 deletions translations/be_Latn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="320"/>
<location filename="../src/qml/About/Main.qml" line="321"/>
<location filename="../src/qml/User/Main.qml" line="219"/>
<location filename="../src/qml/WLAN/Main.qml" line="99"/>
<source>→</source>
Expand Down Expand Up @@ -1024,12 +1024,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="312"/>
<location filename="../src/qml/About/Main.qml" line="313"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="328"/>
<location filename="../src/qml/About/Main.qml" line="329"/>
<source>Open Source Software Statement</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -1253,18 +1253,12 @@
<source>Power</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="253"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="249"/>
<location filename="../src/qml/SideBar.qml" line="258"/>
<source>System &amp; Update</source>
<translation type="unfinished"></translation>
Expand Down
12 changes: 3 additions & 9 deletions translations/bg_BG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="312"/>
<location filename="../src/qml/About/Main.qml" line="313"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="328"/>
<location filename="../src/qml/About/Main.qml" line="329"/>
<source>Open Source Software Statement</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -720,7 +720,7 @@
<translation>Добавяне на потребител</translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="320"/>
<location filename="../src/qml/About/Main.qml" line="321"/>
<location filename="../src/qml/User/Main.qml" line="219"/>
<location filename="../src/qml/WLAN/Main.qml" line="99"/>
<source>→</source>
Expand Down Expand Up @@ -1257,12 +1257,6 @@
<translation>Мишка</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="249"/>
<location filename="../src/qml/SideBar.qml" line="258"/>
<source>System &amp; Update</source>
<translation type="unfinished"></translation>
Expand Down
12 changes: 3 additions & 9 deletions translations/bs_BA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="312"/>
<location filename="../src/qml/About/Main.qml" line="313"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="328"/>
<location filename="../src/qml/About/Main.qml" line="329"/>
<source>Open Source Software Statement</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -724,7 +724,7 @@
<translation>Dodaj korisnika</translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="320"/>
<location filename="../src/qml/About/Main.qml" line="321"/>
<location filename="../src/qml/User/Main.qml" line="219"/>
<location filename="../src/qml/WLAN/Main.qml" line="99"/>
<source>→</source>
Expand Down Expand Up @@ -1324,18 +1324,12 @@
<source>Power</source>
<translation type="unfinished">Snaga</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="253"/>
<source>About</source>
<translation>O sistemu</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="249"/>
<location filename="../src/qml/SideBar.qml" line="258"/>
<source>System &amp; Update</source>
<translation type="unfinished"></translation>
Expand Down
12 changes: 3 additions & 9 deletions translations/cs_CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="312"/>
<location filename="../src/qml/About/Main.qml" line="313"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="328"/>
<location filename="../src/qml/About/Main.qml" line="329"/>
<source>Open Source Software Statement</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -724,7 +724,7 @@
<translation>Přidat uživatele</translation>
</message>
<message>
<location filename="../src/qml/About/Main.qml" line="320"/>
<location filename="../src/qml/About/Main.qml" line="321"/>
<location filename="../src/qml/User/Main.qml" line="219"/>
<location filename="../src/qml/WLAN/Main.qml" line="99"/>
<source>→</source>
Expand Down Expand Up @@ -1324,18 +1324,12 @@
<source>Power</source>
<translation type="unfinished">Napájení</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="244"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="253"/>
<source>About</source>
<translation>Informace</translation>
</message>
<message>
<location filename="../src/qml/SideBar.qml" line="249"/>
<location filename="../src/qml/SideBar.qml" line="258"/>
<source>System &amp; Update</source>
<translation type="unfinished"></translation>
Expand Down
Loading

0 comments on commit 52a7f9d

Please sign in to comment.