mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Importance code refactoring related to the "preferences" code - Greatly improves performance
This commit is contained in:
parent
a640b08414
commit
e5032a52c4
26 changed files with 976 additions and 1142 deletions
|
@ -74,7 +74,7 @@ public:
|
|||
std::cout << '\t' << prg_name << " --no-splash: " << qPrintable(tr("disable splash screen")) << std::endl;
|
||||
#endif
|
||||
std::cout << '\t' << prg_name << " --help: " << qPrintable(tr("displays this help message")) << std::endl;
|
||||
std::cout << '\t' << prg_name << " --webui-port=x: " << qPrintable(tr("changes the webui port (current: %1)").arg(QString::number(Preferences::getWebUiPort()))) << std::endl;
|
||||
std::cout << '\t' << prg_name << " --webui-port=x: " << qPrintable(tr("changes the webui port (current: %1)").arg(QString::number(Preferences().getWebUiPort()))) << std::endl;
|
||||
std::cout << '\t' << prg_name << " " << qPrintable(tr("[files or urls]: downloads the torrents passed by the user (optional)")) << std::endl;
|
||||
}
|
||||
};
|
||||
|
@ -154,7 +154,7 @@ void useStyle(QString style){
|
|||
if(!style.isEmpty()) {
|
||||
QApplication::setStyle(QStyleFactory::create(style));
|
||||
}
|
||||
Preferences::setStyle(QApplication::style()->objectName());
|
||||
Preferences().setStyle(QApplication::style()->objectName());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -240,7 +240,7 @@ int main(int argc, char *argv[]){
|
|||
bool ok = false;
|
||||
int new_port = parts.last().toInt(&ok);
|
||||
if(ok && new_port > 0 && new_port <= 65535) {
|
||||
Preferences::setWebUiPort(new_port);
|
||||
Preferences().setWebUiPort(new_port);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue