Refactor to be able to build data classes as extra lib

This commit is contained in:
Martchus 2016-09-29 21:19:54 +02:00
parent 3bb28130f3
commit 3335350a81
19 changed files with 159 additions and 135 deletions

View File

@ -17,6 +17,7 @@ set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_
# add project files # add project files
set(HEADER_FILES set(HEADER_FILES
data/syncthingconnection.h data/syncthingconnection.h
data/syncthingconnectionsettings.h
data/syncthingdirectorymodel.h data/syncthingdirectorymodel.h
data/syncthingdevicemodel.h data/syncthingdevicemodel.h
data/syncthingdownloadmodel.h data/syncthingdownloadmodel.h
@ -26,6 +27,7 @@ set(HEADER_FILES
) )
set(SRC_FILES set(SRC_FILES
data/syncthingconnection.cpp data/syncthingconnection.cpp
data/syncthingconnectionsettings.cpp
data/syncthingdirectorymodel.cpp data/syncthingdirectorymodel.cpp
data/syncthingdevicemodel.cpp data/syncthingdevicemodel.cpp
data/syncthingdownloadmodel.cpp data/syncthingdownloadmodel.cpp

View File

@ -31,7 +31,7 @@ int initSyncthingTray(bool windowed, bool waitForTray)
{ {
if(windowed) { if(windowed) {
if(Settings::launchSynchting()) { if(Settings::launchSynchting()) {
syncthingProcess().startSyncthing(); syncthingProcess().startSyncthing(Settings::syncthingCmd());
} }
auto *trayWidget = new TrayWidget; auto *trayWidget = new TrayWidget;
trayWidget->setAttribute(Qt::WA_DeleteOnClose); trayWidget->setAttribute(Qt::WA_DeleteOnClose);
@ -40,7 +40,7 @@ int initSyncthingTray(bool windowed, bool waitForTray)
#ifndef QT_NO_SYSTEMTRAYICON #ifndef QT_NO_SYSTEMTRAYICON
if(QSystemTrayIcon::isSystemTrayAvailable() || waitForTray) { if(QSystemTrayIcon::isSystemTrayAvailable() || waitForTray) {
if(Settings::launchSynchting()) { if(Settings::launchSynchting()) {
syncthingProcess().startSyncthing(); syncthingProcess().startSyncthing(Settings::syncthingCmd());
} }
auto *trayIcon = new TrayIcon; auto *trayIcon = new TrayIcon;
trayIcon->show(); trayIcon->show();

View File

@ -3,6 +3,7 @@
#include <qtutilities/settingsdialog/qtsettings.h> #include <qtutilities/settingsdialog/qtsettings.h>
#include <QString> #include <QString>
#include <QStringBuilder>
#include <QByteArray> #include <QByteArray>
#include <QApplication> #include <QApplication>
#include <QSettings> #include <QSettings>
@ -12,7 +13,7 @@
#include <QMessageBox> #include <QMessageBox>
using namespace std; using namespace std;
using namespace Media; using namespace Data;
namespace Settings { namespace Settings {
@ -23,15 +24,15 @@ bool &firstLaunch()
} }
// connection // connection
ConnectionSettings &primaryConnectionSettings() SyncthingConnectionSettings &primaryConnectionSettings()
{ {
static ConnectionSettings v; static SyncthingConnectionSettings v;
return v; return v;
} }
std::vector<ConnectionSettings> &secondaryConnectionSettings() std::vector<SyncthingConnectionSettings> &secondaryConnectionSettings()
{ {
static vector<ConnectionSettings> v; static vector<SyncthingConnectionSettings> v;
return v; return v;
} }
@ -94,6 +95,10 @@ QString &syncthingArgs()
static QString v; static QString v;
return v; return v;
} }
QString syncthingCmd()
{
return syncthingPath() % QChar(' ') % syncthingArgs();
}
// web view // web view
#if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT) #if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT)
@ -137,7 +142,7 @@ void restore()
secondaryConnectionSettings().clear(); secondaryConnectionSettings().clear();
secondaryConnectionSettings().reserve(static_cast<size_t>(connectionCount)); secondaryConnectionSettings().reserve(static_cast<size_t>(connectionCount));
for(int i = 0; i < connectionCount; ++i) { for(int i = 0; i < connectionCount; ++i) {
ConnectionSettings *connectionSettings; SyncthingConnectionSettings *connectionSettings;
if(i == 0) { if(i == 0) {
connectionSettings = &primaryConnectionSettings(); connectionSettings = &primaryConnectionSettings();
} else { } else {
@ -202,7 +207,7 @@ void save()
const int connectionCount = static_cast<int>(1 + secondaryConnectionSettings().size()); const int connectionCount = static_cast<int>(1 + secondaryConnectionSettings().size());
settings.beginWriteArray(QStringLiteral("connections"), connectionCount); settings.beginWriteArray(QStringLiteral("connections"), connectionCount);
for(int i = 0; i < connectionCount; ++i) { for(int i = 0; i < connectionCount; ++i) {
const ConnectionSettings *connectionSettings = (i == 0 ? &primaryConnectionSettings() : &secondaryConnectionSettings()[static_cast<size_t>(i - 1)]); const SyncthingConnectionSettings *connectionSettings = (i == 0 ? &primaryConnectionSettings() : &secondaryConnectionSettings()[static_cast<size_t>(i - 1)]);
settings.setArrayIndex(i); settings.setArrayIndex(i);
settings.setValue(QStringLiteral("label"), connectionSettings->label); settings.setValue(QStringLiteral("label"), connectionSettings->label);
settings.setValue(QStringLiteral("syncthingUrl"), connectionSettings->syncthingUrl); settings.setValue(QStringLiteral("syncthingUrl"), connectionSettings->syncthingUrl);
@ -243,21 +248,4 @@ void save()
qtSettings().save(settings); qtSettings().save(settings);
} }
bool ConnectionSettings::loadHttpsCert()
{
if(!httpsCertPath.isEmpty()) {
const QList<QSslCertificate> cert = QSslCertificate::fromPath(httpsCertPath);
if(cert.isEmpty()) {
return false;
}
expectedSslErrors.clear();
expectedSslErrors.reserve(4);
expectedSslErrors << QSslError(QSslError::UnableToGetLocalIssuerCertificate, cert.at(0));
expectedSslErrors << QSslError(QSslError::UnableToVerifyFirstCertificate, cert.at(0));
expectedSslErrors << QSslError(QSslError::SelfSignedCertificate, cert.at(0));
expectedSslErrors << QSslError(QSslError::HostNameMismatch, cert.at(0));
}
return true;
}
} }

View File

@ -1,11 +1,12 @@
#ifndef SETTINGS_H #ifndef SETTINGS_H
#define SETTINGS_H #define SETTINGS_H
#include "../data/syncthingconnectionsettings.h"
#include <c++utilities/conversion/types.h> #include <c++utilities/conversion/types.h>
#include <QString> #include <QString>
#include <QByteArray> #include <QByteArray>
#include <QSslError>
#include <vector> #include <vector>
@ -25,21 +26,8 @@ namespace Settings {
bool &firstLaunch(); bool &firstLaunch();
// connection // connection
struct ConnectionSettings { Data::SyncthingConnectionSettings &primaryConnectionSettings();
QString label; std::vector<Data::SyncthingConnectionSettings> &secondaryConnectionSettings();
QString syncthingUrl;
bool authEnabled = false;
QString userName;
QString password;
QByteArray apiKey;
int trafficPollInterval = 2000;
int devStatsPollInterval = 60000;
QString httpsCertPath;
QList<QSslError> expectedSslErrors;
bool loadHttpsCert();
};
ConnectionSettings &primaryConnectionSettings();
std::vector<ConnectionSettings> &secondaryConnectionSettings();
// notifications // notifications
bool &notifyOnDisconnect(); bool &notifyOnDisconnect();
@ -56,6 +44,7 @@ int &frameStyle();
bool &launchSynchting(); bool &launchSynchting();
QString &syncthingPath(); QString &syncthingPath();
QString &syncthingArgs(); QString &syncthingArgs();
QString syncthingCmd();
// web view // web view
#if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT) #if defined(SYNCTHINGTRAY_USE_WEBENGINE) || defined(SYNCTHINGTRAY_USE_WEBKIT)

View File

@ -1,7 +1,6 @@
#include "./syncthingconnection.h" #include "./syncthingconnection.h"
#include "./syncthingconfig.h" #include "./syncthingconfig.h"
#include "./syncthingconnectionsettings.h"
#include "../application/settings.h"
#include <c++utilities/conversion/conversionexception.h> #include <c++utilities/conversion/conversionexception.h>
#include <c++utilities/conversion/stringconversion.h> #include <c++utilities/conversion/stringconversion.h>
@ -231,7 +230,7 @@ void SyncthingConnection::reconnect()
* \brief Applies the specifies configuration and tries to reconnect via reconnect(). * \brief Applies the specifies configuration and tries to reconnect via reconnect().
* \remarks The expected SSL errors of the specified configuration are updated accordingly. * \remarks The expected SSL errors of the specified configuration are updated accordingly.
*/ */
void SyncthingConnection::reconnect(Settings::ConnectionSettings &connectionSettings) void SyncthingConnection::reconnect(SyncthingConnectionSettings &connectionSettings)
{ {
setSyncthingUrl(connectionSettings.syncthingUrl); setSyncthingUrl(connectionSettings.syncthingUrl);
setApiKey(connectionSettings.apiKey); setApiKey(connectionSettings.apiKey);

View File

@ -18,12 +18,10 @@ QT_FORWARD_DECLARE_CLASS(QUrlQuery)
QT_FORWARD_DECLARE_CLASS(QJsonObject) QT_FORWARD_DECLARE_CLASS(QJsonObject)
QT_FORWARD_DECLARE_CLASS(QJsonArray) QT_FORWARD_DECLARE_CLASS(QJsonArray)
namespace Settings {
struct ConnectionSettings;
}
namespace Data { namespace Data {
struct SyncthingConnectionSettings;
QNetworkAccessManager &networkAccessManager(); QNetworkAccessManager &networkAccessManager();
enum class SyncthingStatus enum class SyncthingStatus
@ -200,7 +198,7 @@ public Q_SLOTS:
void connect(); void connect();
void disconnect(); void disconnect();
void reconnect(); void reconnect();
void reconnect(Settings::ConnectionSettings &connectionSettings); void reconnect(SyncthingConnectionSettings &connectionSettings);
void pause(const QString &devId); void pause(const QString &devId);
void pauseAllDevs(); void pauseAllDevs();
void resume(const QString &devId); void resume(const QString &devId);

View File

@ -0,0 +1,22 @@
#include "./syncthingconnectionsettings.h"
namespace Data {
bool SyncthingConnectionSettings::loadHttpsCert()
{
if(!httpsCertPath.isEmpty()) {
const QList<QSslCertificate> cert = QSslCertificate::fromPath(httpsCertPath);
if(cert.isEmpty()) {
return false;
}
expectedSslErrors.clear();
expectedSslErrors.reserve(4);
expectedSslErrors << QSslError(QSslError::UnableToGetLocalIssuerCertificate, cert.at(0));
expectedSslErrors << QSslError(QSslError::UnableToVerifyFirstCertificate, cert.at(0));
expectedSslErrors << QSslError(QSslError::SelfSignedCertificate, cert.at(0));
expectedSslErrors << QSslError(QSslError::HostNameMismatch, cert.at(0));
}
return true;
}
}

View File

@ -0,0 +1,26 @@
#ifndef SYNCTHINGCONNECTIONSETTINGS_H
#define SYNCTHINGCONNECTIONSETTINGS_H
#include <QString>
#include <QByteArray>
#include <QSslError>
namespace Data {
struct SyncthingConnectionSettings {
QString label;
QString syncthingUrl;
bool authEnabled = false;
QString userName;
QString password;
QByteArray apiKey;
int trafficPollInterval = 2000;
int devStatsPollInterval = 60000;
QString httpsCertPath;
QList<QSslError> expectedSslErrors;
bool loadHttpsCert();
};
}
#endif // SYNCTHINGCONNECTIONSETTINGS_H

View File

@ -1,36 +1,36 @@
#include "./syncthingprocess.h" #include "./syncthingprocess.h"
#include "../application/settings.h"
#include <QTimer> #include <QTimer>
#include <QStringBuilder>
namespace Data { namespace Data {
SyncthingProcess::SyncthingProcess(QObject *parent) : SyncthingProcess::SyncthingProcess(QObject *parent) :
QProcess(parent), QProcess(parent)
m_restarting(false)
{ {
setProcessChannelMode(QProcess::MergedChannels); setProcessChannelMode(QProcess::MergedChannels);
connect(this, static_cast<void(SyncthingProcess::*)(int exitCode, QProcess::ExitStatus exitStatus)>(&SyncthingProcess::finished), this, &SyncthingProcess::handleFinished); connect(this, static_cast<void(SyncthingProcess::*)(int exitCode, QProcess::ExitStatus exitStatus)>(&SyncthingProcess::finished), this, &SyncthingProcess::handleFinished);
} }
void SyncthingProcess::restartSyncthing() void SyncthingProcess::restartSyncthing(const QString &cmd)
{ {
if(state() == QProcess::Running) { if(state() == QProcess::Running) {
m_restarting = true; m_cmd = cmd;
// give Syncthing 5 seconds to terminate, otherwise kill it // give Syncthing 5 seconds to terminate, otherwise kill it
QTimer::singleShot(5000, this, SLOT(killToRestart())); QTimer::singleShot(5000, this, SLOT(killToRestart()));
terminate(); terminate();
} else { } else {
startSyncthing(); startSyncthing(cmd);
} }
} }
void SyncthingProcess::startSyncthing() void SyncthingProcess::startSyncthing(const QString &cmd)
{ {
if(state() == QProcess::NotRunning) { if(state() == QProcess::NotRunning) {
start(Settings::syncthingPath() % QChar(' ') % Settings::syncthingArgs(), QProcess::ReadOnly); if(cmd.isEmpty()) {
start(QProcess::ReadOnly);
} else {
start(cmd, QProcess::ReadOnly);
}
} }
} }
@ -38,15 +38,15 @@ void SyncthingProcess::handleFinished(int exitCode, QProcess::ExitStatus exitSta
{ {
Q_UNUSED(exitCode) Q_UNUSED(exitCode)
Q_UNUSED(exitStatus) Q_UNUSED(exitStatus)
if(m_restarting) { if(!m_cmd.isEmpty()) {
m_restarting = false; startSyncthing(m_cmd);
startSyncthing(); m_cmd.clear();
} }
} }
void SyncthingProcess::killToRestart() void SyncthingProcess::killToRestart()
{ {
if(m_restarting) { if(!m_cmd.isEmpty()) {
kill(); kill();
} }
} }

View File

@ -12,15 +12,15 @@ public:
SyncthingProcess(QObject *parent = nullptr); SyncthingProcess(QObject *parent = nullptr);
public Q_SLOTS: public Q_SLOTS:
void restartSyncthing(); void restartSyncthing(const QString &cmd);
void startSyncthing(); void startSyncthing(const QString &cmd);
private Q_SLOTS: private Q_SLOTS:
void handleFinished(int exitCode, QProcess::ExitStatus exitStatus); void handleFinished(int exitCode, QProcess::ExitStatus exitStatus);
void killToRestart(); void killToRestart();
private: private:
bool m_restarting; QString m_cmd;
}; };
SyncthingProcess &syncthingProcess(); SyncthingProcess &syncthingProcess();

View File

@ -1,4 +1,4 @@
#include "utils.h" #include "./utils.h"
#include <c++utilities/chrono/datetime.h> #include <c++utilities/chrono/datetime.h>

View File

@ -110,7 +110,7 @@ bool ConnectionOptionPage::showConnectionSettings(int index)
bool ok = true; bool ok = true;
if(index != m_currentIndex) { if(index != m_currentIndex) {
if((ok = cacheCurrentSettings(false))) { if((ok = cacheCurrentSettings(false))) {
const ConnectionSettings &connectionSettings = (index == 0 ? m_primarySettings : m_secondarySettings[static_cast<size_t>(index - 1)]); const SyncthingConnectionSettings &connectionSettings = (index == 0 ? m_primarySettings : m_secondarySettings[static_cast<size_t>(index - 1)]);
ui()->urlLineEdit->setText(connectionSettings.syncthingUrl); ui()->urlLineEdit->setText(connectionSettings.syncthingUrl);
ui()->authCheckBox->setChecked(connectionSettings.authEnabled); ui()->authCheckBox->setChecked(connectionSettings.authEnabled);
ui()->userNameLineEdit->setText(connectionSettings.userName); ui()->userNameLineEdit->setText(connectionSettings.userName);
@ -133,7 +133,7 @@ bool ConnectionOptionPage::cacheCurrentSettings(bool applying)
{ {
bool ok = true; bool ok = true;
if(m_currentIndex >= 0) { if(m_currentIndex >= 0) {
ConnectionSettings &connectionSettings = (m_currentIndex == 0 ? m_primarySettings : m_secondarySettings[static_cast<size_t>(m_currentIndex - 1)]); SyncthingConnectionSettings &connectionSettings = (m_currentIndex == 0 ? m_primarySettings : m_secondarySettings[static_cast<size_t>(m_currentIndex - 1)]);
connectionSettings.syncthingUrl = ui()->urlLineEdit->text(); connectionSettings.syncthingUrl = ui()->urlLineEdit->text();
connectionSettings.authEnabled = ui()->authCheckBox->isChecked(); connectionSettings.authEnabled = ui()->authCheckBox->isChecked();
connectionSettings.userName = ui()->userNameLineEdit->text(); connectionSettings.userName = ui()->userNameLineEdit->text();
@ -204,7 +204,7 @@ void ConnectionOptionPage::reset()
QStringList itemTexts; QStringList itemTexts;
itemTexts.reserve(1 + static_cast<int>(m_secondarySettings.size())); itemTexts.reserve(1 + static_cast<int>(m_secondarySettings.size()));
itemTexts << m_primarySettings.label; itemTexts << m_primarySettings.label;
for(const ConnectionSettings &settings : m_secondarySettings) { for(const SyncthingConnectionSettings &settings : m_secondarySettings) {
itemTexts << settings.label; itemTexts << settings.label;
} }
ui()->selectionComboBox->clear(); ui()->selectionComboBox->clear();
@ -505,7 +505,7 @@ void LauncherOptionPage::launch()
ui()->launchNowPushButton->hide(); ui()->launchNowPushButton->hide();
ui()->stopPushButton->show(); ui()->stopPushButton->show();
m_kill = false; m_kill = false;
syncthingProcess().startSyncthing(); syncthingProcess().startSyncthing(Settings::syncthingCmd());
} }
} }
} }

View File

@ -30,8 +30,8 @@ private:
void addConnectionSettings(); void addConnectionSettings();
void removeConnectionSettings(); void removeConnectionSettings();
Data::SyncthingConnection *m_connection; Data::SyncthingConnection *m_connection;
Settings::ConnectionSettings m_primarySettings; Data::SyncthingConnectionSettings m_primarySettings;
std::vector<Settings::ConnectionSettings> m_secondarySettings; std::vector<Data::SyncthingConnectionSettings> m_secondarySettings;
int m_currentIndex; int m_currentIndex;
END_DECLARE_OPTION_PAGE END_DECLARE_OPTION_PAGE

View File

@ -297,7 +297,7 @@ void TrayWidget::applySettings()
const QList<QAction *> connectionActions = instance->m_connectionsActionGroup->actions(); const QList<QAction *> connectionActions = instance->m_connectionsActionGroup->actions();
instance->m_selectedConnection = nullptr; instance->m_selectedConnection = nullptr;
for(; connectionIndex < connectionCount; ++connectionIndex) { for(; connectionIndex < connectionCount; ++connectionIndex) {
Settings::ConnectionSettings &connectionSettings = (connectionIndex == 0 ? Settings::primaryConnectionSettings() : Settings::secondaryConnectionSettings()[static_cast<size_t>(connectionIndex - 1)]); SyncthingConnectionSettings &connectionSettings = (connectionIndex == 0 ? Settings::primaryConnectionSettings() : Settings::secondaryConnectionSettings()[static_cast<size_t>(connectionIndex - 1)]);
if(connectionIndex < connectionActions.size()) { if(connectionIndex < connectionActions.size()) {
QAction *action = connectionActions.at(connectionIndex); QAction *action = connectionActions.at(connectionIndex);
action->setText(connectionSettings.label); action->setText(connectionSettings.label);

View File

@ -88,7 +88,7 @@ private:
Data::SyncthingDownloadModel m_dlModel; Data::SyncthingDownloadModel m_dlModel;
QMenu *m_connectionsMenu; QMenu *m_connectionsMenu;
QActionGroup *m_connectionsActionGroup; QActionGroup *m_connectionsActionGroup;
Settings::ConnectionSettings *m_selectedConnection; Data::SyncthingConnectionSettings *m_selectedConnection;
std::vector<Data::SyncthingLogEntry> m_notifications; std::vector<Data::SyncthingLogEntry> m_notifications;
static std::vector<TrayWidget *> m_instances; static std::vector<TrayWidget *> m_instances;
}; };

View File

@ -42,7 +42,7 @@ QtGui::WebViewDialog::~WebViewDialog()
Settings::webViewGeometry() = saveGeometry(); Settings::webViewGeometry() = saveGeometry();
} }
void QtGui::WebViewDialog::applySettings(const Settings::ConnectionSettings &connectionSettings) void QtGui::WebViewDialog::applySettings(const Data::SyncthingConnectionSettings &connectionSettings)
{ {
m_settings = connectionSettings; m_settings = connectionSettings;
m_view->setUrl(connectionSettings.syncthingUrl); m_view->setUrl(connectionSettings.syncthingUrl);

View File

@ -24,18 +24,18 @@ public:
~WebViewDialog(); ~WebViewDialog();
public slots: public slots:
void applySettings(const Settings::ConnectionSettings &connectionSettings); void applySettings(const Data::SyncthingConnectionSettings &connectionSettings);
const Settings::ConnectionSettings &settings() const; const Data::SyncthingConnectionSettings &settings() const;
protected: protected:
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event);
private: private:
WEB_VIEW_PROVIDER *m_view; WEB_VIEW_PROVIDER *m_view;
Settings::ConnectionSettings m_settings; Data::SyncthingConnectionSettings m_settings;
}; };
inline const Settings::ConnectionSettings &WebViewDialog::settings() const inline const Data::SyncthingConnectionSettings &WebViewDialog::settings() const
{ {
return m_settings; return m_settings;
} }

View File

@ -45,104 +45,104 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="558"/> <location filename="../data/syncthingconnection.cpp" line="601"/>
<source>Unable to parse Syncthing log: </source> <source>Unable to parse Syncthing log: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="562"/> <location filename="../data/syncthingconnection.cpp" line="605"/>
<source>Unable to request system log: </source> <source>Unable to request system log: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="584"/> <location filename="../data/syncthingconnection.cpp" line="627"/>
<source>Unable to locate certificate used by Syncthing GUI.</source> <source>Unable to locate certificate used by Syncthing GUI.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="590"/> <location filename="../data/syncthingconnection.cpp" line="633"/>
<source>Unable to load certificate used by Syncthing GUI.</source> <source>Unable to load certificate used by Syncthing GUI.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="623"/> <location filename="../data/syncthingconnection.cpp" line="666"/>
<location filename="../data/syncthingconnection.cpp" line="725"/> <location filename="../data/syncthingconnection.cpp" line="768"/>
<source>Unable to parse Syncthing config: </source> <source>Unable to parse Syncthing config: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="629"/> <location filename="../data/syncthingconnection.cpp" line="672"/>
<location filename="../data/syncthingconnection.cpp" line="731"/> <location filename="../data/syncthingconnection.cpp" line="774"/>
<source>Unable to request Syncthing config: </source> <source>Unable to request Syncthing config: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="806"/> <location filename="../data/syncthingconnection.cpp" line="849"/>
<source>Unable to parse connections: </source> <source>Unable to parse connections: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="812"/> <location filename="../data/syncthingconnection.cpp" line="855"/>
<source>Unable to request connections: </source> <source>Unable to request connections: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="867"/> <location filename="../data/syncthingconnection.cpp" line="910"/>
<source>Unable to parse directory statistics: </source> <source>Unable to parse directory statistics: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="873"/> <location filename="../data/syncthingconnection.cpp" line="916"/>
<source>Unable to request directory statistics: </source> <source>Unable to request directory statistics: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="910"/> <location filename="../data/syncthingconnection.cpp" line="953"/>
<source>Unable to parse device statistics: </source> <source>Unable to parse device statistics: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="916"/> <location filename="../data/syncthingconnection.cpp" line="959"/>
<source>Unable to request device statistics: </source> <source>Unable to request device statistics: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="951"/> <location filename="../data/syncthingconnection.cpp" line="994"/>
<source>Unable to parse errors: </source> <source>Unable to parse errors: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="962"/> <location filename="../data/syncthingconnection.cpp" line="1005"/>
<source>Unable to request errors: </source> <source>Unable to request errors: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1013"/> <location filename="../data/syncthingconnection.cpp" line="1056"/>
<source>Unable to parse Syncthing events: </source> <source>Unable to parse Syncthing events: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1032"/> <location filename="../data/syncthingconnection.cpp" line="1075"/>
<source>Unable to request Syncthing events: </source> <source>Unable to request Syncthing events: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1271"/> <location filename="../data/syncthingconnection.cpp" line="1313"/>
<source>Unable to request rescan: </source> <source>Unable to request rescan: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1286"/> <location filename="../data/syncthingconnection.cpp" line="1328"/>
<source>Unable to request pause/resume: </source> <source>Unable to request pause/resume: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1301"/> <location filename="../data/syncthingconnection.cpp" line="1343"/>
<source>Unable to request restart: </source> <source>Unable to request restart: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="529"/> <location filename="../data/syncthingconnection.cpp" line="572"/>
<source>Unable to request QR-Code: </source> <source>Unable to request QR-Code: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -364,12 +364,12 @@
<context> <context>
<name>Data::SyncthingDownloadModel</name> <name>Data::SyncthingDownloadModel</name>
<message> <message>
<location filename="../data/syncthingdownloadmodel.cpp" line="70"/> <location filename="../data/syncthingdownloadmodel.cpp" line="71"/>
<source>Dir/item</source> <source>Dir/item</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingdownloadmodel.cpp" line="71"/> <location filename="../data/syncthingdownloadmodel.cpp" line="72"/>
<source>Progress</source> <source>Progress</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -661,12 +661,12 @@
<context> <context>
<name>QtGui::DownloadView</name> <name>QtGui::DownloadView</name>
<message> <message>
<location filename="../gui/downloadview.cpp" line="53"/> <location filename="../gui/downloadview.cpp" line="55"/>
<source>Copy value</source> <source>Copy value</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../gui/downloadview.cpp" line="55"/> <location filename="../gui/downloadview.cpp" line="57"/>
<source>Copy label/ID</source> <source>Copy label/ID</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1095,7 +1095,7 @@ The Web UI will be opened in the default web browser instead.</source>
<context> <context>
<name>Settings::restore</name> <name>Settings::restore</name>
<message> <message>
<location filename="../application/settings.cpp" line="161"/> <location filename="../application/settings.cpp" line="166"/>
<source>Unable to load certificate &quot;%1&quot; when restoring settings.</source> <source>Unable to load certificate &quot;%1&quot; when restoring settings.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -45,104 +45,104 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="558"/> <location filename="../data/syncthingconnection.cpp" line="601"/>
<source>Unable to parse Syncthing log: </source> <source>Unable to parse Syncthing log: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="562"/> <location filename="../data/syncthingconnection.cpp" line="605"/>
<source>Unable to request system log: </source> <source>Unable to request system log: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="584"/> <location filename="../data/syncthingconnection.cpp" line="627"/>
<source>Unable to locate certificate used by Syncthing GUI.</source> <source>Unable to locate certificate used by Syncthing GUI.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="590"/> <location filename="../data/syncthingconnection.cpp" line="633"/>
<source>Unable to load certificate used by Syncthing GUI.</source> <source>Unable to load certificate used by Syncthing GUI.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="623"/> <location filename="../data/syncthingconnection.cpp" line="666"/>
<location filename="../data/syncthingconnection.cpp" line="725"/> <location filename="../data/syncthingconnection.cpp" line="768"/>
<source>Unable to parse Syncthing config: </source> <source>Unable to parse Syncthing config: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="629"/> <location filename="../data/syncthingconnection.cpp" line="672"/>
<location filename="../data/syncthingconnection.cpp" line="731"/> <location filename="../data/syncthingconnection.cpp" line="774"/>
<source>Unable to request Syncthing config: </source> <source>Unable to request Syncthing config: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="806"/> <location filename="../data/syncthingconnection.cpp" line="849"/>
<source>Unable to parse connections: </source> <source>Unable to parse connections: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="812"/> <location filename="../data/syncthingconnection.cpp" line="855"/>
<source>Unable to request connections: </source> <source>Unable to request connections: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="867"/> <location filename="../data/syncthingconnection.cpp" line="910"/>
<source>Unable to parse directory statistics: </source> <source>Unable to parse directory statistics: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="873"/> <location filename="../data/syncthingconnection.cpp" line="916"/>
<source>Unable to request directory statistics: </source> <source>Unable to request directory statistics: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="910"/> <location filename="../data/syncthingconnection.cpp" line="953"/>
<source>Unable to parse device statistics: </source> <source>Unable to parse device statistics: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="916"/> <location filename="../data/syncthingconnection.cpp" line="959"/>
<source>Unable to request device statistics: </source> <source>Unable to request device statistics: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="951"/> <location filename="../data/syncthingconnection.cpp" line="994"/>
<source>Unable to parse errors: </source> <source>Unable to parse errors: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="962"/> <location filename="../data/syncthingconnection.cpp" line="1005"/>
<source>Unable to request errors: </source> <source>Unable to request errors: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1013"/> <location filename="../data/syncthingconnection.cpp" line="1056"/>
<source>Unable to parse Syncthing events: </source> <source>Unable to parse Syncthing events: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1032"/> <location filename="../data/syncthingconnection.cpp" line="1075"/>
<source>Unable to request Syncthing events: </source> <source>Unable to request Syncthing events: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1271"/> <location filename="../data/syncthingconnection.cpp" line="1313"/>
<source>Unable to request rescan: </source> <source>Unable to request rescan: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1286"/> <location filename="../data/syncthingconnection.cpp" line="1328"/>
<source>Unable to request pause/resume: </source> <source>Unable to request pause/resume: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="1301"/> <location filename="../data/syncthingconnection.cpp" line="1343"/>
<source>Unable to request restart: </source> <source>Unable to request restart: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingconnection.cpp" line="529"/> <location filename="../data/syncthingconnection.cpp" line="572"/>
<source>Unable to request QR-Code: </source> <source>Unable to request QR-Code: </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -364,12 +364,12 @@
<context> <context>
<name>Data::SyncthingDownloadModel</name> <name>Data::SyncthingDownloadModel</name>
<message> <message>
<location filename="../data/syncthingdownloadmodel.cpp" line="70"/> <location filename="../data/syncthingdownloadmodel.cpp" line="71"/>
<source>Dir/item</source> <source>Dir/item</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../data/syncthingdownloadmodel.cpp" line="71"/> <location filename="../data/syncthingdownloadmodel.cpp" line="72"/>
<source>Progress</source> <source>Progress</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -661,12 +661,12 @@
<context> <context>
<name>QtGui::DownloadView</name> <name>QtGui::DownloadView</name>
<message> <message>
<location filename="../gui/downloadview.cpp" line="53"/> <location filename="../gui/downloadview.cpp" line="55"/>
<source>Copy value</source> <source>Copy value</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../gui/downloadview.cpp" line="55"/> <location filename="../gui/downloadview.cpp" line="57"/>
<source>Copy label/ID</source> <source>Copy label/ID</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1095,7 +1095,7 @@ The Web UI will be opened in the default web browser instead.</source>
<context> <context>
<name>Settings::restore</name> <name>Settings::restore</name>
<message> <message>
<location filename="../application/settings.cpp" line="161"/> <location filename="../application/settings.cpp" line="166"/>
<source>Unable to load certificate &quot;%1&quot; when restoring settings.</source> <source>Unable to load certificate &quot;%1&quot; when restoring settings.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>