diff --git a/Telegram/SourceFiles/boxes/download_path_box.cpp b/Telegram/SourceFiles/boxes/download_path_box.cpp index 596591c688..48cbfd0436 100644 --- a/Telegram/SourceFiles/boxes/download_path_box.cpp +++ b/Telegram/SourceFiles/boxes/download_path_box.cpp @@ -33,7 +33,7 @@ void DownloadPathBox::prepare() { _group->setChangedCallback([this](Directory value) { radioChanged(value); }); - connect(_pathLink, SIGNAL(clicked()), this, SLOT(onEditPath())); + _pathLink->addClickHandler([=] { editPath(); }); if (!_path.isEmpty() && _path != qsl("tmp")) { setPathText(QDir::toNativeSeparators(_path)); } @@ -69,7 +69,7 @@ void DownloadPathBox::radioChanged(Directory value) { if (value == Directory::Custom) { if (_path.isEmpty() || _path == qsl("tmp")) { _group->setValue(_path.isEmpty() ? Directory::Downloads : Directory::Temp); - onEditPath(); + editPath(); } else { setPathText(QDir::toNativeSeparators(_path)); } @@ -82,7 +82,7 @@ void DownloadPathBox::radioChanged(Directory value) { update(); } -void DownloadPathBox::onEditPath() { +void DownloadPathBox::editPath() { const auto initialPath = [] { if (!Global::DownloadPath().isEmpty() && Global::DownloadPath() != qstr("tmp")) { return Global::DownloadPath().left(Global::DownloadPath().size() - (Global::DownloadPath().endsWith('/') ? 1 : 0)); diff --git a/Telegram/SourceFiles/boxes/download_path_box.h b/Telegram/SourceFiles/boxes/download_path_box.h index 6a19734e3e..e092ff0fbd 100644 --- a/Telegram/SourceFiles/boxes/download_path_box.h +++ b/Telegram/SourceFiles/boxes/download_path_box.h @@ -19,8 +19,6 @@ class LinkButton; } // namespace Ui class DownloadPathBox : public BoxContent { - Q_OBJECT - public: DownloadPathBox(QWidget *parent); @@ -29,9 +27,6 @@ protected: void resizeEvent(QResizeEvent *e) override; -private slots: - void onEditPath(); - private: enum class Directory { Downloads, @@ -51,6 +46,7 @@ private: void save(); void updateControlsVisibility(); void setPathText(const QString &text); + void editPath(); QString _path; QByteArray _pathBookmark; diff --git a/Telegram/SourceFiles/profile/profile_block_widget.h b/Telegram/SourceFiles/profile/profile_block_widget.h index 469eee0f89..2162121cb7 100644 --- a/Telegram/SourceFiles/profile/profile_block_widget.h +++ b/Telegram/SourceFiles/profile/profile_block_widget.h @@ -15,8 +15,6 @@ namespace Profile { class SectionMemento; class BlockWidget : public Ui::RpWidget, protected base::Subscriber { - Q_OBJECT - public: BlockWidget(QWidget *parent, PeerData *peer, const QString &title); diff --git a/Telegram/SourceFiles/storage/file_download.h b/Telegram/SourceFiles/storage/file_download.h index f6befa667a..ba6d832b98 100644 --- a/Telegram/SourceFiles/storage/file_download.h +++ b/Telegram/SourceFiles/storage/file_download.h @@ -199,8 +199,6 @@ protected: class StorageImageLocation; class WebFileLocation; class mtpFileLoader : public FileLoader, public RPCSender { - Q_OBJECT - public: mtpFileLoader( not_null location, @@ -330,8 +328,6 @@ private: class webFileLoaderPrivate; class webFileLoader : public FileLoader { - Q_OBJECT - public: webFileLoader( const QString &url, @@ -422,10 +418,7 @@ private: class WebLoadMainManager : public QObject { Q_OBJECT -public: - public slots: - void progress(webFileLoader *loader, qint64 already, qint64 size); void finished(webFileLoader *loader, QByteArray data); void error(webFileLoader *loader); diff --git a/Telegram/SourceFiles/ui/widgets/multi_select.h b/Telegram/SourceFiles/ui/widgets/multi_select.h index dd69488104..9c84522d7e 100644 --- a/Telegram/SourceFiles/ui/widgets/multi_select.h +++ b/Telegram/SourceFiles/ui/widgets/multi_select.h @@ -68,8 +68,6 @@ private: // This class is hold in header because it requires Qt preprocessing. class MultiSelect::Inner : public TWidget { - Q_OBJECT - public: using ScrollCallback = Fn; Inner(QWidget *parent, const style::MultiSelect &st, Fn placeholderFactory, ScrollCallback callback); @@ -159,7 +157,6 @@ private: }; - class MultiSelect::Item { public: Item(const style::MultiSelectItem &st, uint64 id, const QString &text, style::color color, PaintRoundImage &&paintRoundImage); diff --git a/Telegram/SourceFiles/window/layer_widget.h b/Telegram/SourceFiles/window/layer_widget.h index 9c0248d18b..8a6cd77698 100644 --- a/Telegram/SourceFiles/window/layer_widget.h +++ b/Telegram/SourceFiles/window/layer_widget.h @@ -197,8 +197,6 @@ private: } // namespace Window class MediaPreviewWidget : public TWidget, private base::Subscriber { - Q_OBJECT - public: MediaPreviewWidget(QWidget *parent, not_null controller); diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.h b/Telegram/SourceFiles/window/themes/window_theme_editor.h index 292ff281d2..0c94a50fb7 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_editor.h +++ b/Telegram/SourceFiles/window/themes/window_theme_editor.h @@ -19,8 +19,6 @@ namespace Window { namespace Theme { class Editor : public TWidget { - Q_OBJECT - public: Editor(QWidget*, const QString &path);