mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(build): format code
This commit is contained in:
parent
5eea8ba27f
commit
f4d9cff7d4
|
@ -27,13 +27,13 @@
|
||||||
#include <AppImageUpdaterBridge>
|
#include <AppImageUpdaterBridge>
|
||||||
#include <AppImageUpdaterDialog>
|
#include <AppImageUpdaterDialog>
|
||||||
#endif
|
#endif
|
||||||
|
#include <QDebug>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QRegularExpression>
|
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QRegularExpression>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QDebug>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#ifndef APPIMAGE_UPDATER_BRIDGE_ENABLED
|
#ifndef APPIMAGE_UPDATER_BRIDGE_ENABLED
|
||||||
|
@ -96,7 +96,7 @@ void UpdateCheck::initUpdate()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef APPIMAGE_UPDATER_BRIDGE_ENABLED
|
#ifndef APPIMAGE_UPDATER_BRIDGE_ENABLED
|
||||||
void UpdateCheck::handleResponse(QNetworkReply *reply)
|
void UpdateCheck::handleResponse(QNetworkReply* reply)
|
||||||
{
|
{
|
||||||
assert(reply != nullptr);
|
assert(reply != nullptr);
|
||||||
if (reply == nullptr) {
|
if (reply == nullptr) {
|
||||||
|
@ -129,8 +129,7 @@ void UpdateCheck::handleResponse(QNetworkReply *reply)
|
||||||
qInfo() << "Update available to version" << latestVersion;
|
qInfo() << "Update available to version" << latestVersion;
|
||||||
QUrl link{mainMap["html_url"].toString()};
|
QUrl link{mainMap["html_url"].toString()};
|
||||||
emit updateAvailable(latestVersion, link);
|
emit updateAvailable(latestVersion, link);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
qInfo() << "qTox is up to date";
|
qInfo() << "qTox is up to date";
|
||||||
emit upToDate();
|
emit upToDate();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with qTox. If not, see <http://www.gnu.org/licenses/>.
|
along with qTox. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include <QObject>
|
|
||||||
#include <QNetworkAccessManager>
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QObject>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#ifdef APPIMAGE_UPDATER_BRIDGE_ENABLED
|
#ifdef APPIMAGE_UPDATER_BRIDGE_ENABLED
|
||||||
|
|
|
@ -20,17 +20,17 @@
|
||||||
#include "aboutform.h"
|
#include "aboutform.h"
|
||||||
#include "ui_aboutsettings.h"
|
#include "ui_aboutsettings.h"
|
||||||
|
|
||||||
#include "src/widget/tool/recursivesignalblocker.h"
|
|
||||||
#include "src/net/updatecheck.h"
|
#include "src/net/updatecheck.h"
|
||||||
#include "src/widget/style.h"
|
|
||||||
#include "src/widget/translator.h"
|
|
||||||
#include "src/persistence/profile.h"
|
#include "src/persistence/profile.h"
|
||||||
#include "src/persistence/settings.h"
|
#include "src/persistence/settings.h"
|
||||||
|
#include "src/widget/style.h"
|
||||||
|
#include "src/widget/tool/recursivesignalblocker.h"
|
||||||
|
#include "src/widget/translator.h"
|
||||||
|
|
||||||
#include <tox/tox.h>
|
#include <tox/tox.h>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
@ -173,9 +173,8 @@ void AboutForm::replaceVersions()
|
||||||
void AboutForm::onUpdateAvailable(QString latestVersion, QUrl link)
|
void AboutForm::onUpdateAvailable(QString latestVersion, QUrl link)
|
||||||
{
|
{
|
||||||
QObject::disconnect(linkConnection);
|
QObject::disconnect(linkConnection);
|
||||||
linkConnection = connect(bodyUI->updateAvailableButton, &QPushButton::clicked, [link](){
|
linkConnection = connect(bodyUI->updateAvailableButton, &QPushButton::clicked,
|
||||||
QDesktopServices::openUrl(link);
|
[link]() { QDesktopServices::openUrl(link); });
|
||||||
});
|
|
||||||
bodyUI->updateStack->setCurrentIndex(static_cast<int>(updateIndex::available));
|
bodyUI->updateStack->setCurrentIndex(static_cast<int>(updateIndex::available));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user