1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-09 18:32:15 +02:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Christophe Dumez
d09a3ddd0c Tagged v2.3.0rc5 release 2010-07-19 19:00:49 +00:00
35 changed files with 4614 additions and 4420 deletions

View File

@@ -345,10 +345,18 @@ void GUI::on_actionBugReport_triggered() const {
}
void GUI::tab_changed(int new_tab) {
if(new_tab == TAB_TRANSFER) {
Q_UNUSED(new_tab);
// We cannot rely on the index new_tab
// because the tab order is undetermined now
if(tabs->currentWidget() == vSplitter) {
qDebug("Changed tab to transfer list, refreshing the list");
transferList->refreshList();
properties->loadDynamicData();
return;
}
if(tabs->currentWidget() == searchEngine) {
qDebug("Changed tab to search engine, giving focus to search input");
searchEngine->giveFocusToSearchInput();
}
}
@@ -401,15 +409,17 @@ void GUI::createKeyboardShortcuts() {
// Keyboard shortcuts slots
void GUI::displayTransferTab() const {
tabs->setCurrentIndex(TAB_TRANSFER);
tabs->setCurrentWidget(transferList);
}
void GUI::displaySearchTab() const {
tabs->setCurrentIndex(TAB_SEARCH);
if(searchEngine)
tabs->setCurrentWidget(searchEngine);
}
void GUI::displayRSSTab() const {
tabs->setCurrentIndex(TAB_RSS);
if(rssWidget)
tabs->setCurrentWidget(rssWidget);
}
// End of keyboard shortcuts slots
@@ -509,10 +519,12 @@ void GUI::on_actionExit_triggered() {
close();
}
int GUI::getCurrentTabIndex() const {
QWidget* GUI::getCurrentTabWidget() const {
if(isMinimized() || !isVisible())
return -1;
return tabs->currentIndex();
return 0;
if(tabs->currentIndex() == 0)
return transferList;
return tabs->currentWidget();
}
void GUI::setTabText(int index, QString text) const {
@@ -551,7 +563,7 @@ void GUI::on_actionAbout_triggered() {
void GUI::showEvent(QShowEvent *e) {
qDebug("** Show Event **");
if(getCurrentTabIndex() == TAB_TRANSFER) {
if(getCurrentTabWidget() == transferList) {
qDebug("-> Refreshing transfer list");
transferList->refreshList();
properties->loadDynamicData();

View File

@@ -37,8 +37,6 @@
#include "ui_mainwindow.h"
#include "qtorrenthandle.h"
enum TabIndex{TAB_TRANSFER, TAB_SEARCH, TAB_RSS};
class Bittorrent;
class QTimer;
class downloadFromURL;
@@ -68,7 +66,7 @@ public:
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList());
~GUI();
// Methods
int getCurrentTabIndex() const;
QWidget* getCurrentTabWidget() const;
TransferListWidget* getTransferList() const { return transferList; }
QMenu* getTrayIconMenu();

File diff suppressed because it is too large Load Diff

View File

@@ -162,10 +162,10 @@ public slots:
void startTorrentsInPause(bool b);
void setDefaultTempPath(QString temppath);
void setAppendLabelToSavePath(bool append);
void appendLabelToTorrentSavePath(QTorrentHandle h);
void changeLabelInTorrentSavePath(QTorrentHandle h, QString old_label, QString new_label);
void appendLabelToTorrentSavePath(QTorrentHandle &h);
void changeLabelInTorrentSavePath(QTorrentHandle &h, QString old_label, QString new_label);
#if LIBTORRENT_VERSION_MINOR > 14
void appendqBextensionToTorrent(QTorrentHandle h, bool append);
void appendqBextensionToTorrent(QTorrentHandle &h, bool append);
void setAppendqBExtension(bool append);
#endif
void applyEncryptionSettings(pe_settings se);
@@ -226,6 +226,7 @@ private:
QPointer<BandwidthScheduler> bd_scheduler;
QMap<QUrl, QString> savepath_fromurl;
QHash<QString, QHash<QString, TrackerInfos> > trackersInfos;
QHash<QString, QString> savePathsToRemove;
QStringList torrentsToPausedAfterChecking;
QTimer resumeDataTimer;
// Ratio

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -94,6 +94,7 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, GUI* main_window, TransferLi
connect(PropDelegate, SIGNAL(filteredFilesChanged()), this, SLOT(filteredFilesChanged()));
connect(stackedProperties, SIGNAL(currentChanged(int)), this, SLOT(loadDynamicData()));
connect(BTSession, SIGNAL(savePathChanged(QTorrentHandle&)), this, SLOT(updateSavePath(QTorrentHandle&)));
connect(BTSession, SIGNAL(metadataReceived(QTorrentHandle&)), this, SLOT(updateTorrentInfos(QTorrentHandle&)));
// Downloaded pieces progress bar
downloaded_pieces = new DownloadedPiecesBar(this);
@@ -226,6 +227,12 @@ void PropertiesWidget::updateSavePath(QTorrentHandle& _h) {
}
}
void PropertiesWidget::updateTorrentInfos(QTorrentHandle& _h) {
if(h.is_valid() && h == _h) {
loadTorrentInfos(h);
}
}
void PropertiesWidget::on_reannounce_btn_clicked() {
if(h.is_valid()) {
h.force_reannounce();
@@ -243,18 +250,8 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
try {
// Save path
QString p;
if(h.has_metadata() && h.num_files() == 1) {
p = h.firstFileSavePath();
} else {
p = TorrentPersistentData::getSavePath(h.hash());
if(p.isEmpty())
p = h.save_path();
}
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
p = p.replace("/", "\\");
#endif
save_path->setText(p);
updateSavePath(h);
changeSavePathButton->setEnabled(h.has_metadata());
// Creation date
lbl_creationDate->setText(h.creation_date());
// Hash
@@ -330,7 +327,7 @@ void PropertiesWidget::reloadPreferences() {
void PropertiesWidget::loadDynamicData() {
// Refresh only if the torrent handle is valid and if visible
if(!h.is_valid() || main_window->getCurrentTabIndex() != TAB_TRANSFER || state != VISIBLE) return;
if(!h.is_valid() || main_window->getCurrentTabWidget() != transferList || state != VISIBLE) return;
try {
// Transfer infos
if(stackedProperties->currentIndex() == MAIN_TAB) {

View File

@@ -85,6 +85,7 @@ protected:
protected slots:
void loadTorrentInfos(QTorrentHandle &h);
void updateTorrentInfos(QTorrentHandle &h);
void loadUrlSeeds();
void on_main_infos_button_clicked();
void on_trackers_button_clicked();

View File

@@ -599,6 +599,8 @@ void QTorrentHandle::force_recheck() const {
void QTorrentHandle::move_storage(QString new_path) const {
Q_ASSERT(h.is_valid());
if(QDir(save_path()) == QDir(new_path)) return;
TorrentPersistentData::setPreviousSavePath(hash(), save_path());
h.move_storage(new_path.toLocal8Bit().constData());
}

View File

@@ -277,6 +277,10 @@ void SearchEngine::searchTextEdited(QString) {
search_button->setText(tr("Search"));
}
void SearchEngine::giveFocusToSearchInput() {
search_pattern->setFocus();
}
// Function called when we click on search button
void SearchEngine::on_search_button_clicked(){
#ifdef Q_WS_WIN
@@ -549,7 +553,7 @@ void SearchEngine::searchFinished(int exitcode,QProcess::ExitStatus){
}
QIniSettings settings("qBittorrent", "qBittorrent");
bool useNotificationBalloons = settings.value("Preferences/General/NotificationBaloons", true).toBool();
if(useNotificationBalloons && parent->getCurrentTabIndex() != TAB_SEARCH) {
if(useNotificationBalloons && parent->getCurrentTabWidget() != this) {
parent->showNotificationBaloon(tr("Search Engine"), tr("Search has finished"));
}
if(exitcode){

View File

@@ -104,6 +104,7 @@ public:
public slots:
void on_download_button_clicked();
void downloadTorrent(QString engine_url, QString torrent_url);
void giveFocusToSearchInput();
protected slots:
// Search slots

View File

@@ -3,7 +3,7 @@ LANG_PATH = lang
ICONS_PATH = Icons
# Set the following variable to 1 to enable debug
DEBUG_MODE = 0
DEBUG_MODE = 1
# Global
TEMPLATE = app
@@ -12,9 +12,9 @@ CONFIG += qt \
# Update this VERSION for each release
os2 {
DEFINES += VERSION=\'\"v2.3.0rc3\"\'
DEFINES += VERSION=\'\"v2.3.0rc5\"\'
} else {
DEFINES += VERSION=\\\"v2.3.0rc3\\\"
DEFINES += VERSION=\\\"v2.3.0rc5\\\"
}
DEFINES += VERSION_MAJOR=2
DEFINES += VERSION_MINOR=3

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More