Show Libraries's version used in the about window.

(cherry picked from commit 7b007f82caaac98a21101a37a71bbc9464022ca3)
This commit is contained in:
sledgehammer_999 2011-08-28 23:24:13 +03:00 committed by Christophe Dumez
parent 3282e53e93
commit 0c7643cfb3
4 changed files with 126 additions and 11 deletions

View File

@ -1,5 +1,6 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.9.0
- COSMETIC: Display speed at the beginning of the Window title
- OTHER: Display libraries versions in about dialog (sledgehammer999)
* Thu Jun 02 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.8.0
- FEATURE: Added full libtorrent v0.16 support (uTP, ...)

View File

@ -78,7 +78,7 @@
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab2">
<widget class="QWidget" name="tab6">
<attribute name="title">
<string>About</string>
</attribute>
@ -129,7 +129,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<widget class="QWidget" name="tab3">
<widget class="QWidget" name="tab5">
<attribute name="title">
<string>Author</string>
</attribute>
@ -259,7 +259,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<widget class="QWidget" name="tab5">
<widget class="QWidget" name="tab3">
<attribute name="title">
<string>Translation</string>
</attribute>
@ -276,7 +276,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<widget class="QWidget" name="tab1">
<widget class="QWidget" name="tab2">
<attribute name="title">
<string>License</string>
</attribute>
@ -289,6 +289,114 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<widget class="QWidget" name="tab1">
<attribute name="title">
<string>Libraries</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>This version of qBittorrent was built against the following libraries:</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Qt:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Boost:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_13">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_12">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Libtorrent:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
@ -296,7 +404,6 @@ p, li { white-space: pre-wrap; }
<layoutdefault spacing="6" margin="11"/>
<resources>
<include location="icons.qrc"/>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -33,6 +33,9 @@
#include "ui_about.h"
#include <QFile>
#include <QtGlobal>
#include <libtorrent/version.hpp>
#include <boost/version.hpp>
class about : public QDialog, private Ui::AboutDlg{
Q_OBJECT
@ -99,6 +102,10 @@ class about : public QDialog, private Ui::AboutDlg{
te_license->setHtml(licensefile.readAll());
licensefile.close();
}
// Libraries
label_11->setText(QT_VERSION_STR);
label_12->setText(LIBTORRENT_VERSION);
label_13->setText(QString::number(BOOST_VERSION / 100000) + "." + QString::number((BOOST_VERSION / 100) % 1000) + "." + QString::number(BOOST_VERSION % 100));
show();
}
};

View File

@ -7,14 +7,14 @@ RC_FILE = qbittorrent_mingw.rc
#Adapt the lib names/versions accordingly
CONFIG(debug, debug|release) {
LIBS += libtorrent \
libboost_system-mgw45-mt-d-1_46_1 \
libboost_filesystem-mgw45-mt-d-1_46_1 \
libboost_thread-mgw45-mt-d-1_46_1
libboost_system-mgw45-mt-d-1_47 \
libboost_filesystem-mgw45-mt-d-1_47 \
libboost_thread-mgw45-mt-d-1_47
} else {
LIBS += libtorrent \
libboost_system-mgw45-mt-1_46_1 \
libboost_filesystem-mgw45-mt-1_46_1 \
libboost_thread-mgw45-mt-1_46_1
libboost_system-mgw45-mt-1_47 \
libboost_filesystem-mgw45-mt-1_47 \
libboost_thread-mgw45-mt-1_47
}
LIBS += libadvapi32 libshell32