mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Replace QScopedPointer with std::unqiue_ptr
These 2 types are very similar and we should prefer the one from C++ standard library, this reduces the number of types in our code base. Also see: https://stackoverflow.com/questions/40346393/should-i-use-qscopedpointer-or-stdunique-ptr#comment67966940_40346991
This commit is contained in:
parent
78ab0e4ba9
commit
5e3fddf456
7 changed files with 18 additions and 16 deletions
|
@ -30,13 +30,13 @@
|
|||
#include <QtGlobal>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <QDebug>
|
||||
#include <QScopedPointer>
|
||||
#include <QThread>
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
|
@ -117,7 +117,7 @@ int main(int argc, char *argv[])
|
|||
try {
|
||||
// Create Application
|
||||
const QString appId = QLatin1String("qBittorrent-") + Utils::Misc::getUserIDString();
|
||||
QScopedPointer<Application> app(new Application(appId, argc, argv));
|
||||
std::unique_ptr<Application> app(new Application(appId, argc, argv));
|
||||
|
||||
const QBtCommandLineParameters params = app->commandLineArgs();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue