feat: add system update

pull/55/head
kateleet 4 years ago
parent 8a24e7b64b
commit ef2d8ff5ec

@ -23,6 +23,7 @@
#include <QStorageInfo> #include <QStorageInfo>
#include <QRegularExpression> #include <QRegularExpression>
#include <QSettings> #include <QSettings>
#include <QProcess>
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
#include <sys/sysinfo.h> #include <sys/sysinfo.h>
@ -178,6 +179,11 @@ QString About::cpuInfo()
return QString(); return QString();
} }
void About::openUpdator()
{
QProcess::startDetached("cutefish-updator", QStringList());
}
qlonglong About::calculateTotalRam() const qlonglong About::calculateTotalRam() const
{ {
qlonglong ret = -1; qlonglong ret = -1;

@ -59,6 +59,8 @@ public:
QString internalStorage(); QString internalStorage();
QString cpuInfo(); QString cpuInfo();
Q_INVOKABLE void openUpdator();
private: private:
qlonglong calculateTotalRam() const; qlonglong calculateTotalRam() const;
}; };

@ -122,13 +122,14 @@ ItemPage {
height: FishUI.Units.smallSpacing height: FishUI.Units.smallSpacing
} }
// StandardButton { StandardButton {
// Layout.fillWidth: true Layout.fillWidth: true
// text: qsTr("System Update") visible: about.isCutefishOS
// onClicked: { text: qsTr("System Update")
// rootWindow.stackView.push(Qt.resolvedUrl("qrc:/qml/Update/Main.qml")) onClicked: {
// } about.openUpdator()
// } }
}
} }
} }
} }

@ -92,6 +92,11 @@
<source>Internal Storage</source> <source>Internal Storage</source>
<translation>Internal Storage</translation> <translation>Internal Storage</translation>
</message> </message>
<message>
<location filename="../src/qml/About/Main.qml" line="128"/>
<source>System Update</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../src/qml/Appearance/Main.qml" line="30"/> <location filename="../src/qml/Appearance/Main.qml" line="30"/>
<source>Appearance</source> <source>Appearance</source>
@ -783,7 +788,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/Sound/Main.qml" line="172"/> <location filename="../src/qml/Sound/Main.qml" line="173"/>
<source>Input Devices</source> <source>Input Devices</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

@ -92,6 +92,11 @@
<source>Internal Storage</source> <source>Internal Storage</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../src/qml/About/Main.qml" line="128"/>
<source>System Update</source>
<translation></translation>
</message>
<message> <message>
<location filename="../src/qml/Appearance/Main.qml" line="30"/> <location filename="../src/qml/Appearance/Main.qml" line="30"/>
<source>Appearance</source> <source>Appearance</source>
@ -783,7 +788,7 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../src/qml/Sound/Main.qml" line="172"/> <location filename="../src/qml/Sound/Main.qml" line="173"/>
<source>Input Devices</source> <source>Input Devices</source>
<translation></translation> <translation></translation>
</message> </message>

Loading…
Cancel
Save