Merge branch 'qt_migration' into feature/qt6-server-busy-notification
This commit is contained in:
commit
580975fda1
28 changed files with 292 additions and 858 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#include "AppSettingsLogic.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "logger.h"
|
||||
#include "defines.h"
|
||||
#include "ui/qautostart.h"
|
||||
#include "ui/uilogic.h"
|
||||
|
|
@ -62,18 +62,18 @@ void AppSettingsLogic::onCheckBoxSaveLogsCheckedToggled(bool checked)
|
|||
|
||||
void AppSettingsLogic::onPushButtonOpenLogsClicked()
|
||||
{
|
||||
Debug::openLogsFolder();
|
||||
Logger::openLogsFolder();
|
||||
}
|
||||
|
||||
void AppSettingsLogic::onPushButtonExportLogsClicked()
|
||||
{
|
||||
uiLogic()->saveTextFile(tr("Save log"), "AmneziaVPN.log", ".log", Debug::getLogFile());
|
||||
uiLogic()->saveTextFile(tr("Save log"), "AmneziaVPN.log", ".log", Logger::getLogFile());
|
||||
}
|
||||
|
||||
void AppSettingsLogic::onPushButtonClearLogsClicked()
|
||||
{
|
||||
Debug::clearLogs();
|
||||
Debug::clearServiceLogs();
|
||||
Logger::clearLogs();
|
||||
Logger::clearServiceLogs();
|
||||
}
|
||||
|
||||
void AppSettingsLogic::onPushButtonBackupAppConfigClicked()
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ VpnLogic::VpnLogic(UiLogic *logic, QObject *parent):
|
|||
connect(this, &VpnLogic::connectToVpn, uiLogic()->m_vpnConnection, &VpnConnection::connectToVpn, Qt::QueuedConnection);
|
||||
connect(this, &VpnLogic::disconnectFromVpn, uiLogic()->m_vpnConnection, &VpnConnection::disconnectFromVpn, Qt::QueuedConnection);
|
||||
|
||||
connect(m_settings.get(), &Settings::saveLogsChanged, this, &VpnLogic::onUpdatePage);
|
||||
|
||||
if (m_settings->isAutoConnect() && m_settings->defaultServerIndex() >= 0) {
|
||||
QTimer::singleShot(1000, this, [this](){
|
||||
set_pushButtonConnectEnabled(false);
|
||||
|
|
@ -88,6 +90,8 @@ void VpnLogic::onUpdatePage()
|
|||
}
|
||||
QString ver = QString("v. %2").arg(QString(APP_MAJOR_VERSION));
|
||||
set_labelVersionText(ver);
|
||||
|
||||
set_labelLogEnabledVisible(m_settings->isSaveLogs());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ class VpnLogic : public PageLogicBase
|
|||
AUTO_PROPERTY(bool, radioButtonVpnModeForwardSitesChecked)
|
||||
AUTO_PROPERTY(bool, radioButtonVpnModeExceptSitesChecked)
|
||||
|
||||
AUTO_PROPERTY(bool, labelLogEnabledVisible)
|
||||
|
||||
public:
|
||||
Q_INVOKABLE void onUpdatePage() override;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ PageBase {
|
|||
}
|
||||
|
||||
UrlButtonType {
|
||||
id: button_donate
|
||||
y: 10
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: 21
|
||||
|
|
@ -55,6 +56,21 @@ PageBase {
|
|||
}
|
||||
}
|
||||
|
||||
LabelType {
|
||||
id: lb_log_enabled
|
||||
anchors.top: button_donate.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width
|
||||
height: 21
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
text: "Logging enabled!"
|
||||
color: "#D4D4D4"
|
||||
|
||||
visible: VpnLogic.labelLogEnabledVisible
|
||||
}
|
||||
|
||||
AnimatedImage {
|
||||
id: connect_anim
|
||||
source: "qrc:/images/animation.gif"
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include "ui/qautostart.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "logger.h"
|
||||
#include "defines.h"
|
||||
#include "uilogic.h"
|
||||
#include "utilities.h"
|
||||
|
|
@ -190,9 +190,9 @@ void UiLogic::keyPressEvent(Qt::Key key)
|
|||
case Qt::Key_AsciiTilde:
|
||||
case Qt::Key_QuoteLeft: emit toggleLogPanel();
|
||||
break;
|
||||
case Qt::Key_L: Debug::openLogsFolder();
|
||||
case Qt::Key_L: Logger::openLogsFolder();
|
||||
break;
|
||||
case Qt::Key_K: Debug::openServiceLogsFolder();
|
||||
case Qt::Key_K: Logger::openServiceLogsFolder();
|
||||
break;
|
||||
#ifdef QT_DEBUG
|
||||
case Qt::Key_Q:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue