mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-01-23 19:54:41 -05:00
display libretroshare version in About dialogs and enable dirty flag support
This commit is contained in:
parent
32a3c860ae
commit
df8d7b0f9b
3 changed files with 22 additions and 4 deletions
|
|
@ -230,11 +230,15 @@ void AWidget::initImages()
|
|||
|
||||
/* Draw RetroShare version */
|
||||
#ifdef RS_ONLYHIDDENNODE
|
||||
p.drawText(QPointF(10, 50), QString("%1 : %2 (With embedded Tor)").arg(tr("Retroshare version"), Rshare::retroshareVersion(true)));
|
||||
p.drawText(QPointF(10, 50), QString("%1 : %2 (With embedded Tor)").arg(tr("Retroshare version"), RsApplication::retroshareVersion(true)));
|
||||
#else
|
||||
p.drawText(QPointF(10, 50), QString("%1 : %2").arg(tr("Retroshare version"), RsApplication::retroshareVersion(true)));
|
||||
#endif
|
||||
|
||||
/* [Added] Draw libretroshare (Engine) version below the GUI version */
|
||||
/* y=70 is used to fit nicely between RS version (50) and Qt version (90) */
|
||||
p.drawText(QPointF(10, 70), QString("%1 : %2").arg(tr("Engine version"), QString::fromUtf8(RsInit::libRetroShareVersion())));
|
||||
|
||||
/* Draw Qt's version number */
|
||||
p.drawText(QPointF(10, 90), QString("Qt %1 : %2").arg(tr("version"), QT_VERSION_STR));
|
||||
|
||||
|
|
@ -940,13 +944,17 @@ static QString addLibraries(const std::string &name, const std::list<RsLibraryIn
|
|||
return mTextEdit;
|
||||
}
|
||||
|
||||
|
||||
void AboutWidget::on_copy_button_clicked()
|
||||
{
|
||||
QString verInfo;
|
||||
QString rsVerString = "RetroShare Version: ";
|
||||
rsVerString+=RsApplication::retroshareVersion(true);
|
||||
verInfo+=rsVerString;
|
||||
|
||||
/* [Added] Append Engine version to clipboard info */
|
||||
verInfo+= "\nRetroShare Engine: ";
|
||||
verInfo+= QString::fromUtf8(RsInit::libRetroShareVersion());
|
||||
|
||||
#ifdef RS_ONLYHIDDENNODE
|
||||
verInfo+=" " + tr("Only Hidden Node");
|
||||
#endif
|
||||
|
|
@ -1003,3 +1011,4 @@ void AboutWidget::on_copy_button_clicked()
|
|||
|
||||
QApplication::clipboard()->setText(verInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,11 +80,20 @@ HelpDialog::HelpDialog(QWidget *parent) :
|
|||
ui->thanks->setHtml(in.readAll());
|
||||
}
|
||||
|
||||
ui->version->setText(RsApplication::retroshareVersion(true));
|
||||
/* [Modified] Display both GUI and Engine versions clearly */
|
||||
QString versionText = QString("RetroShare GUI: %1\nRetroShare Engine: %2")
|
||||
.arg(RsApplication::retroshareVersion(true))
|
||||
.arg(QString::fromUtf8(RsInit::libRetroShareVersion()));
|
||||
|
||||
ui->version->setText(versionText);
|
||||
|
||||
/* Add version numbers of libretroshare */
|
||||
std::list<RsLibraryInfo> libraries;
|
||||
RsControl::instance()->getLibraries(libraries);
|
||||
|
||||
/* [Added] Insert Engine version at the top of the libraries list */
|
||||
libraries.push_front(RsLibraryInfo("RetroShare Engine", RsInit::libRetroShareVersion()));
|
||||
|
||||
addLibraries(ui->libraryLayout, "libretroshare", libraries);
|
||||
|
||||
// #ifdef RS_WEBUI
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ defined in command line")
|
|||
DEFINES += RS_MINI_VERSION=$${RS_MINI_VERSION}
|
||||
DEFINES += RS_EXTRA_VERSION=\\\"$${RS_EXTRA_VERSION}\\\"
|
||||
} else {
|
||||
RS_GIT_DESCRIBE = $$system(git describe --long --match v*.*.*)
|
||||
RS_GIT_DESCRIBE = $$system(git describe --long --dirty --match v*.*.*)
|
||||
contains(RS_GIT_DESCRIBE, ^v\d+\.\d+\.\d+.*) {
|
||||
RS_GIT_DESCRIBE_SPLIT = $$split(RS_GIT_DESCRIBE, v)
|
||||
RS_GIT_DESCRIBE_SPLIT = $$split(RS_GIT_DESCRIBE_SPLIT, .)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue