mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Merge pull request #10302 from Chocobo1/uptr
Replace QScopedPointer with std::unqiue_ptr
This commit is contained in:
commit
0f1fc7be9d
7 changed files with 18 additions and 16 deletions
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "fspathedit.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
|
@ -74,7 +76,7 @@ class FileSystemPathEdit::FileSystemPathEditPrivate
|
|||
QString dialogCaptionOrDefault() const;
|
||||
|
||||
FileSystemPathEdit *q_ptr;
|
||||
QScopedPointer<Private::FileEditorWithCompletion> m_editor;
|
||||
std::unique_ptr<Private::FileEditorWithCompletion> m_editor;
|
||||
QAction *m_browseAction;
|
||||
QToolButton *m_browseBtn;
|
||||
QString m_fileNameFilter;
|
||||
|
@ -192,7 +194,10 @@ FileSystemPathEdit::FileSystemPathEdit(Private::FileEditorWithCompletion *editor
|
|||
connect(d->m_browseAction, &QAction::triggered, this, [this]() { this->d_func()->browseActionTriggered(); });
|
||||
}
|
||||
|
||||
FileSystemPathEdit::~FileSystemPathEdit() = default;
|
||||
FileSystemPathEdit::~FileSystemPathEdit()
|
||||
{
|
||||
delete d_ptr;
|
||||
}
|
||||
|
||||
QString FileSystemPathEdit::selectedPath() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue