mirror of https://github.com/procxx/kepka.git
Remove some unneeded Q_OBJECTs.
This commit is contained in:
parent
5192049194
commit
8eb0f3b60a
|
@ -33,7 +33,7 @@ void DownloadPathBox::prepare() {
|
||||||
|
|
||||||
_group->setChangedCallback([this](Directory value) { radioChanged(value); });
|
_group->setChangedCallback([this](Directory value) { radioChanged(value); });
|
||||||
|
|
||||||
connect(_pathLink, SIGNAL(clicked()), this, SLOT(onEditPath()));
|
_pathLink->addClickHandler([=] { editPath(); });
|
||||||
if (!_path.isEmpty() && _path != qsl("tmp")) {
|
if (!_path.isEmpty() && _path != qsl("tmp")) {
|
||||||
setPathText(QDir::toNativeSeparators(_path));
|
setPathText(QDir::toNativeSeparators(_path));
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ void DownloadPathBox::radioChanged(Directory value) {
|
||||||
if (value == Directory::Custom) {
|
if (value == Directory::Custom) {
|
||||||
if (_path.isEmpty() || _path == qsl("tmp")) {
|
if (_path.isEmpty() || _path == qsl("tmp")) {
|
||||||
_group->setValue(_path.isEmpty() ? Directory::Downloads : Directory::Temp);
|
_group->setValue(_path.isEmpty() ? Directory::Downloads : Directory::Temp);
|
||||||
onEditPath();
|
editPath();
|
||||||
} else {
|
} else {
|
||||||
setPathText(QDir::toNativeSeparators(_path));
|
setPathText(QDir::toNativeSeparators(_path));
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ void DownloadPathBox::radioChanged(Directory value) {
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadPathBox::onEditPath() {
|
void DownloadPathBox::editPath() {
|
||||||
const auto initialPath = [] {
|
const auto initialPath = [] {
|
||||||
if (!Global::DownloadPath().isEmpty() && Global::DownloadPath() != qstr("tmp")) {
|
if (!Global::DownloadPath().isEmpty() && Global::DownloadPath() != qstr("tmp")) {
|
||||||
return Global::DownloadPath().left(Global::DownloadPath().size() - (Global::DownloadPath().endsWith('/') ? 1 : 0));
|
return Global::DownloadPath().left(Global::DownloadPath().size() - (Global::DownloadPath().endsWith('/') ? 1 : 0));
|
||||||
|
|
|
@ -19,8 +19,6 @@ class LinkButton;
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
||||||
class DownloadPathBox : public BoxContent {
|
class DownloadPathBox : public BoxContent {
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DownloadPathBox(QWidget *parent);
|
DownloadPathBox(QWidget *parent);
|
||||||
|
|
||||||
|
@ -29,9 +27,6 @@ protected:
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent *e) override;
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
|
|
||||||
private slots:
|
|
||||||
void onEditPath();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class Directory {
|
enum class Directory {
|
||||||
Downloads,
|
Downloads,
|
||||||
|
@ -51,6 +46,7 @@ private:
|
||||||
void save();
|
void save();
|
||||||
void updateControlsVisibility();
|
void updateControlsVisibility();
|
||||||
void setPathText(const QString &text);
|
void setPathText(const QString &text);
|
||||||
|
void editPath();
|
||||||
|
|
||||||
QString _path;
|
QString _path;
|
||||||
QByteArray _pathBookmark;
|
QByteArray _pathBookmark;
|
||||||
|
|
|
@ -15,8 +15,6 @@ namespace Profile {
|
||||||
class SectionMemento;
|
class SectionMemento;
|
||||||
|
|
||||||
class BlockWidget : public Ui::RpWidget, protected base::Subscriber {
|
class BlockWidget : public Ui::RpWidget, protected base::Subscriber {
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BlockWidget(QWidget *parent, PeerData *peer, const QString &title);
|
BlockWidget(QWidget *parent, PeerData *peer, const QString &title);
|
||||||
|
|
||||||
|
|
|
@ -199,8 +199,6 @@ protected:
|
||||||
class StorageImageLocation;
|
class StorageImageLocation;
|
||||||
class WebFileLocation;
|
class WebFileLocation;
|
||||||
class mtpFileLoader : public FileLoader, public RPCSender {
|
class mtpFileLoader : public FileLoader, public RPCSender {
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
mtpFileLoader(
|
mtpFileLoader(
|
||||||
not_null<StorageImageLocation*> location,
|
not_null<StorageImageLocation*> location,
|
||||||
|
@ -330,8 +328,6 @@ private:
|
||||||
class webFileLoaderPrivate;
|
class webFileLoaderPrivate;
|
||||||
|
|
||||||
class webFileLoader : public FileLoader {
|
class webFileLoader : public FileLoader {
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
webFileLoader(
|
webFileLoader(
|
||||||
const QString &url,
|
const QString &url,
|
||||||
|
@ -422,10 +418,7 @@ private:
|
||||||
class WebLoadMainManager : public QObject {
|
class WebLoadMainManager : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
void progress(webFileLoader *loader, qint64 already, qint64 size);
|
void progress(webFileLoader *loader, qint64 already, qint64 size);
|
||||||
void finished(webFileLoader *loader, QByteArray data);
|
void finished(webFileLoader *loader, QByteArray data);
|
||||||
void error(webFileLoader *loader);
|
void error(webFileLoader *loader);
|
||||||
|
|
|
@ -68,8 +68,6 @@ private:
|
||||||
|
|
||||||
// This class is hold in header because it requires Qt preprocessing.
|
// This class is hold in header because it requires Qt preprocessing.
|
||||||
class MultiSelect::Inner : public TWidget {
|
class MultiSelect::Inner : public TWidget {
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using ScrollCallback = Fn<void(int activeTop, int activeBottom)>;
|
using ScrollCallback = Fn<void(int activeTop, int activeBottom)>;
|
||||||
Inner(QWidget *parent, const style::MultiSelect &st, Fn<QString()> placeholderFactory, ScrollCallback callback);
|
Inner(QWidget *parent, const style::MultiSelect &st, Fn<QString()> placeholderFactory, ScrollCallback callback);
|
||||||
|
@ -159,7 +157,6 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class MultiSelect::Item {
|
class MultiSelect::Item {
|
||||||
public:
|
public:
|
||||||
Item(const style::MultiSelectItem &st, uint64 id, const QString &text, style::color color, PaintRoundImage &&paintRoundImage);
|
Item(const style::MultiSelectItem &st, uint64 id, const QString &text, style::color color, PaintRoundImage &&paintRoundImage);
|
||||||
|
|
|
@ -197,8 +197,6 @@ private:
|
||||||
} // namespace Window
|
} // namespace Window
|
||||||
|
|
||||||
class MediaPreviewWidget : public TWidget, private base::Subscriber {
|
class MediaPreviewWidget : public TWidget, private base::Subscriber {
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MediaPreviewWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
MediaPreviewWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ namespace Window {
|
||||||
namespace Theme {
|
namespace Theme {
|
||||||
|
|
||||||
class Editor : public TWidget {
|
class Editor : public TWidget {
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Editor(QWidget*, const QString &path);
|
Editor(QWidget*, const QString &path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue