Show libsyncthing version as tooltip
This commit is contained in:
parent
4b6cb69586
commit
02971698cf
|
@ -51,6 +51,18 @@ bool SyncthingLauncher::isLibSyncthingAvailable()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Returns the Syncthing version provided by libsyncthing or "Not built with libsyncthing support." if not built with libsyncthing support.
|
||||||
|
*/
|
||||||
|
QString SyncthingLauncher::libSyncthingVersionInfo()
|
||||||
|
{
|
||||||
|
#ifdef SYNCTHINGWIDGETS_USE_LIBSYNCTHING
|
||||||
|
return QString::fromStdString(LibSyncthing::longSyncthingVersion());
|
||||||
|
#else
|
||||||
|
return tr("Not built with libsyncthing support.");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Launches a Syncthing instance using the specified \a arguments.
|
* \brief Launches a Syncthing instance using the specified \a arguments.
|
||||||
*
|
*
|
||||||
|
|
|
@ -34,6 +34,7 @@ public:
|
||||||
static bool isLibSyncthingAvailable();
|
static bool isLibSyncthingAvailable();
|
||||||
static SyncthingLauncher *mainInstance();
|
static SyncthingLauncher *mainInstance();
|
||||||
static void setMainInstance(SyncthingLauncher *mainInstance);
|
static void setMainInstance(SyncthingLauncher *mainInstance);
|
||||||
|
static QString libSyncthingVersionInfo();
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void confirmKill();
|
void confirmKill();
|
||||||
|
|
|
@ -837,6 +837,9 @@ QWidget *LauncherOptionPage::setupWidget()
|
||||||
ui()->launchNowPushButton->setHidden(running);
|
ui()->launchNowPushButton->setHidden(running);
|
||||||
ui()->stopPushButton->setHidden(!running);
|
ui()->stopPushButton->setHidden(!running);
|
||||||
ui()->useBuiltInVersionCheckBox->setVisible(isSyncthing && SyncthingLauncher::isLibSyncthingAvailable());
|
ui()->useBuiltInVersionCheckBox->setVisible(isSyncthing && SyncthingLauncher::isLibSyncthingAvailable());
|
||||||
|
if (isSyncthing) {
|
||||||
|
ui()->useBuiltInVersionCheckBox->setToolTip(SyncthingLauncher::libSyncthingVersionInfo());
|
||||||
|
}
|
||||||
|
|
||||||
// connect signals & slots
|
// connect signals & slots
|
||||||
if (m_process) {
|
if (m_process) {
|
||||||
|
|
Loading…
Reference in New Issue