mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-14 08:48:17 +00:00
- Fixed deleteFromList (non permanently) -> bug introduced recently
This commit is contained in:
parent
243045917a
commit
3d8032a092
@ -63,7 +63,6 @@
|
|||||||
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
setWindowTitle(tr("qBittorrent ")+VERSION);
|
setWindowTitle(tr("qBittorrent ")+VERSION);
|
||||||
QCoreApplication::setApplicationName("qBittorrent");
|
|
||||||
readSettings();
|
readSettings();
|
||||||
s = new session(fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0));
|
s = new session(fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0));
|
||||||
|
|
||||||
@ -1160,6 +1159,7 @@ void GUI::deleteSelection(){
|
|||||||
QHash<QString, torrent_handle>::iterator it = handles.find(fileHash);
|
QHash<QString, torrent_handle>::iterator it = handles.find(fileHash);
|
||||||
if(it != handles.end() && it.key() == fileHash) {
|
if(it != handles.end() && it.key() == fileHash) {
|
||||||
torrent_handle h = it.value();
|
torrent_handle h = it.value();
|
||||||
|
QString fileName = QString(h.name().c_str());
|
||||||
// Remove torrent from handles
|
// Remove torrent from handles
|
||||||
handles.erase(it);
|
handles.erase(it);
|
||||||
s->remove_torrent(h);
|
s->remove_torrent(h);
|
||||||
@ -1175,7 +1175,7 @@ void GUI::deleteSelection(){
|
|||||||
torrentBackup.remove(fileHash+".pieces");
|
torrentBackup.remove(fileHash+".pieces");
|
||||||
torrentBackup.remove(fileHash+".savepath");
|
torrentBackup.remove(fileHash+".savepath");
|
||||||
// Update info bar
|
// Update info bar
|
||||||
setInfoBar("'" + QString(h.name().c_str()) +"' "+tr("removed.", "<file> removed."));
|
setInfoBar("'" + fileName +"' "+tr("removed.", "<file> removed."));
|
||||||
--nbTorrents;
|
--nbTorrents;
|
||||||
tabs->setTabText(0, tr("Transfers") +" ("+QString(misc::toString(nbTorrents).c_str())+")");
|
tabs->setTabText(0, tr("Transfers") +" ("+QString(misc::toString(nbTorrents).c_str())+")");
|
||||||
}else{
|
}else{
|
||||||
|
@ -97,6 +97,7 @@ int main(int argc, char *argv[]){
|
|||||||
qDebug("%s locale unrecognized, using default (en_GB).", (const char*)locale.toUtf8());
|
qDebug("%s locale unrecognized, using default (en_GB).", (const char*)locale.toUtf8());
|
||||||
}
|
}
|
||||||
app.installTranslator(&translator);
|
app.installTranslator(&translator);
|
||||||
|
app.setApplicationName("qBittorrent");
|
||||||
// Read torrents given on command line
|
// Read torrents given on command line
|
||||||
QStringList torrentCmdLine = app.arguments();
|
QStringList torrentCmdLine = app.arguments();
|
||||||
// Remove first argument (program name)
|
// Remove first argument (program name)
|
||||||
|
Loading…
Reference in New Issue
Block a user