mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-22 09:16:05 +03:00
- removed unused function
This commit is contained in:
parent
635283f586
commit
e8adc74051
2 changed files with 0 additions and 27 deletions
26
src/GUI.cpp
26
src/GUI.cpp
|
@ -1064,32 +1064,6 @@ void GUI::torrentCorrupted(const QString& path){
|
||||||
setInfoBar(tr("This file is either corrupted or this isn't a torrent."),"red");
|
setInfoBar(tr("This file is either corrupted or this isn't a torrent."),"red");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GUI::getSavePath(QString hash){
|
|
||||||
QFile savepath_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".savepath");
|
|
||||||
QByteArray line;
|
|
||||||
QString savePath;
|
|
||||||
if(savepath_file.open(QIODevice::ReadOnly | QIODevice::Text)){
|
|
||||||
line = savepath_file.readAll();
|
|
||||||
savepath_file.close();
|
|
||||||
qDebug("Save path: %s", line.data());
|
|
||||||
savePath = QString::fromUtf8(line.data());
|
|
||||||
}else{
|
|
||||||
QSettings settings("qBittorrent", "qBittorrent");
|
|
||||||
savePath = settings.value("Options/Main/ScanDir", QString()).toString();
|
|
||||||
}
|
|
||||||
// Checking if savePath Dir exists
|
|
||||||
// create it if it is not
|
|
||||||
QDir saveDir(savePath);
|
|
||||||
if(!saveDir.exists()){
|
|
||||||
if(!saveDir.mkpath(saveDir.path())){
|
|
||||||
std::cerr << "Couldn't create the save directory: " << (const char*)saveDir.path().toUtf8() << "\n";
|
|
||||||
// TODO: handle this better
|
|
||||||
return QDir::homePath();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return savePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
// As program parameters, we can get paths or urls.
|
// As program parameters, we can get paths or urls.
|
||||||
// This function parse the parameters and call
|
// This function parse the parameters and call
|
||||||
// the right addTorrent function, considering
|
// the right addTorrent function, considering
|
||||||
|
|
|
@ -197,7 +197,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||||
float getNovaVersion(const QString& novaPath) const;
|
float getNovaVersion(const QString& novaPath) const;
|
||||||
QByteArray getNovaChangelog(const QString& novaPath) const;
|
QByteArray getNovaChangelog(const QString& novaPath) const;
|
||||||
void updateNova() const;
|
void updateNova() const;
|
||||||
QString getSavePath(QString fileName);
|
|
||||||
QPoint screenCenter();
|
QPoint screenCenter();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue