mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Remove some unneeded Q_OBJECTs.
This commit is contained in:
parent
5192049194
commit
8eb0f3b60a
7 changed files with 4 additions and 24 deletions
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -199,8 +199,6 @@ protected:
|
|||
class StorageImageLocation;
|
||||
class WebFileLocation;
|
||||
class mtpFileLoader : public FileLoader, public RPCSender {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
mtpFileLoader(
|
||||
not_null<StorageImageLocation*> 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);
|
||||
|
|
|
@ -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<void(int activeTop, int activeBottom)>;
|
||||
Inner(QWidget *parent, const style::MultiSelect &st, Fn<QString()> 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);
|
||||
|
|
|
@ -197,8 +197,6 @@ private:
|
|||
} // namespace Window
|
||||
|
||||
class MediaPreviewWidget : public TWidget, private base::Subscriber {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MediaPreviewWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@ namespace Window {
|
|||
namespace Theme {
|
||||
|
||||
class Editor : public TWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Editor(QWidget*, const QString &path);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue