mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
Move utilities to core/utils folder.
Also move the names to Utils namespace.
This commit is contained in:
parent
427688cb34
commit
191cdc2849
67 changed files with 1172 additions and 1135 deletions
|
@ -66,7 +66,7 @@ Q_IMPORT_PLUGIN(qico)
|
|||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include "application.h"
|
||||
#include "core/misc.h"
|
||||
#include "core/utils/misc.h"
|
||||
#include "core/preferences.h"
|
||||
|
||||
// Signal handlers
|
||||
|
@ -123,7 +123,7 @@ int main(int argc, char *argv[])
|
|||
bool isOneArg = (argc == 2);
|
||||
|
||||
// Create Application
|
||||
QString appId = QLatin1String("qBittorrent-") + misc::getUserIDString();
|
||||
QString appId = QLatin1String("qBittorrent-") + Utils::Misc::getUserIDString();
|
||||
QScopedPointer<Application> app(new Application(appId, argc, argv));
|
||||
|
||||
const QBtCommandLineParameters params = parseCommandLine();
|
||||
|
@ -188,7 +188,7 @@ int main(int argc, char *argv[])
|
|||
#endif
|
||||
qDebug("qBittorrent is already running for this user.");
|
||||
|
||||
misc::msleep(300);
|
||||
Utils::Misc::msleep(300);
|
||||
app->sendParams(params.torrents);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
@ -395,7 +395,7 @@ void displayUsage(const QString& prg_name)
|
|||
#else
|
||||
QMessageBox msgBox(QMessageBox::Information, QObject::tr("Help"), makeUsage(prg_name), QMessageBox::Ok);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(misc::screenCenter(&msgBox));
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
#endif
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ void displayBadArgMessage(const QString& message)
|
|||
QMessageBox msgBox(QMessageBox::Critical, QObject::tr("Bad command line"),
|
||||
message + QLatin1Char('\n') + help, QMessageBox::Ok);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(misc::screenCenter(&msgBox));
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
#else
|
||||
std::cerr << qPrintable(QObject::tr("Bad command line: "));
|
||||
|
@ -439,7 +439,7 @@ bool userAgreesWithLegalNotice()
|
|||
msgBox.addButton(QObject::tr("Cancel"), QMessageBox::RejectRole);
|
||||
QAbstractButton *agree_button = msgBox.addButton(QObject::tr("I Agree"), QMessageBox::AcceptRole);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(misc::screenCenter(&msgBox));
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
if (msgBox.clickedButton() == agree_button) {
|
||||
// Save the answer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue