mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Improve compile times a tiny bit
This commit is contained in:
parent
4e5bd53b13
commit
4ee9e5c27c
24 changed files with 104 additions and 65 deletions
|
@ -7,7 +7,6 @@
|
||||||
#include "ui/Theme.h"
|
#include "ui/Theme.h"
|
||||||
|
|
||||||
class RippleOverlay;
|
class RippleOverlay;
|
||||||
class QPainter;
|
|
||||||
class QMouseEvent;
|
class QMouseEvent;
|
||||||
|
|
||||||
class CommunitiesListItem : public QWidget
|
class CommunitiesListItem : public QWidget
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
#include <QLabel>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
#include "InviteeItem.h"
|
#include "InviteeItem.h"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include <mtx/identifiers.hpp>
|
#include <mtx/identifiers.hpp>
|
||||||
|
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
|
class QLabel;
|
||||||
|
|
||||||
class InviteeItem : public QWidget
|
class InviteeItem : public QWidget
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include <QLabel>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
|
||||||
|
@ -118,7 +119,7 @@ LoginPage::LoginPage(QWidget *parent)
|
||||||
deviceName_->setLabel(tr("Device name"));
|
deviceName_->setLabel(tr("Device name"));
|
||||||
deviceName_->setToolTip(
|
deviceName_->setToolTip(
|
||||||
tr("A name for this device, which will be shown to others, when verifying your devices. "
|
tr("A name for this device, which will be shown to others, when verifying your devices. "
|
||||||
"If none is provided, a random string is used for privacy purposes."));
|
"If none is provided a default is used."));
|
||||||
|
|
||||||
serverInput_ = new TextField(this);
|
serverInput_ = new TextField(this);
|
||||||
serverInput_->setLabel("Homeserver address");
|
serverInput_->setLabel("Homeserver address");
|
||||||
|
@ -179,6 +180,12 @@ LoginPage::LoginPage(QWidget *parent)
|
||||||
connect(serverInput_, SIGNAL(editingFinished()), this, SLOT(onServerAddressEntered()));
|
connect(serverInput_, SIGNAL(editingFinished()), this, SLOT(onServerAddressEntered()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LoginPage::loginError(const QString &msg)
|
||||||
|
{
|
||||||
|
error_label_->setText(msg);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LoginPage::onMatrixIdEntered()
|
LoginPage::onMatrixIdEntered()
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QLayout>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
class FlatButton;
|
class FlatButton;
|
||||||
|
@ -26,6 +24,9 @@ class LoadingIndicator;
|
||||||
class OverlayModal;
|
class OverlayModal;
|
||||||
class RaisedButton;
|
class RaisedButton;
|
||||||
class TextField;
|
class TextField;
|
||||||
|
class QLabel;
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
|
||||||
namespace mtx {
|
namespace mtx {
|
||||||
namespace responses {
|
namespace responses {
|
||||||
|
@ -65,7 +66,7 @@ protected:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// Displays errors produced during the login.
|
// Displays errors produced during the login.
|
||||||
void loginError(const QString &msg) { error_label_->setText(msg); }
|
void loginError(const QString &msg);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// Callback for the back button.
|
// Callback for the back button.
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QWidget>
|
||||||
#include <QLayout>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <mtx/user_interactive.hpp>
|
#include <mtx/user_interactive.hpp>
|
||||||
|
@ -26,6 +26,9 @@
|
||||||
class FlatButton;
|
class FlatButton;
|
||||||
class RaisedButton;
|
class RaisedButton;
|
||||||
class TextField;
|
class TextField;
|
||||||
|
class QLabel;
|
||||||
|
class QVBoxLayout;
|
||||||
|
class QHBoxLayout;
|
||||||
|
|
||||||
class RegisterPage : public QWidget
|
class RegisterPage : public QWidget
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QScroller>
|
#include <QScroller>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QStyleOption>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include "Logging.h"
|
#include "Logging.h"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QStyleOption>
|
||||||
|
|
||||||
#include <mtx/requests.hpp>
|
#include <mtx/requests.hpp>
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ class Menu;
|
||||||
class TextLabel;
|
class TextLabel;
|
||||||
class OverlayModal;
|
class OverlayModal;
|
||||||
|
|
||||||
class QPainter;
|
|
||||||
class QLabel;
|
class QLabel;
|
||||||
class QHBoxLayout;
|
class QHBoxLayout;
|
||||||
class QVBoxLayout;
|
class QVBoxLayout;
|
||||||
|
|
|
@ -16,7 +16,10 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QStyleOption>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
@ -17,13 +17,16 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QWidget>
|
||||||
#include <QLayout>
|
|
||||||
|
|
||||||
class Avatar;
|
class Avatar;
|
||||||
class FlatButton;
|
class FlatButton;
|
||||||
class OverlayModal;
|
class OverlayModal;
|
||||||
|
|
||||||
|
class QLabel;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QVBoxLayout;
|
||||||
|
|
||||||
class UserInfoWidget : public QWidget
|
class UserInfoWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -17,17 +17,18 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QComboBox>
|
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
#include <QFormLayout>
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QLabel>
|
|
||||||
#include <QLayout>
|
|
||||||
#include <QProcessEnvironment>
|
#include <QProcessEnvironment>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
class Toggle;
|
class Toggle;
|
||||||
|
class QLabel;
|
||||||
|
class QFormLayout;
|
||||||
|
class QComboBox;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QVBoxLayout;
|
||||||
|
|
||||||
constexpr int OptionMargin = 6;
|
constexpr int OptionMargin = 6;
|
||||||
constexpr int LayoutTopMargin = 50;
|
constexpr int LayoutTopMargin = 50;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QLabel>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QLabel>
|
|
||||||
#include <QListWidgetItem>
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
|
class QLabel;
|
||||||
class TextField;
|
class TextField;
|
||||||
class QListWidget;
|
class QListWidget;
|
||||||
|
class QListWidgetItem;
|
||||||
|
|
||||||
namespace dialogs {
|
namespace dialogs {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QLabel>
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
@ -163,3 +164,10 @@ ReadReceipts::paintEvent(QPaintEvent *)
|
||||||
QPainter p(this);
|
QPainter p(this);
|
||||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ReadReceipts::hideEvent(QHideEvent *event)
|
||||||
|
{
|
||||||
|
userList_->clear();
|
||||||
|
QFrame::hideEvent(event);
|
||||||
|
}
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QListWidget>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
|
|
||||||
class Avatar;
|
class Avatar;
|
||||||
|
class QLabel;
|
||||||
|
class QListWidget;
|
||||||
|
class QHBoxLayout;
|
||||||
|
class QVBoxLayout;
|
||||||
|
|
||||||
namespace dialogs {
|
namespace dialogs {
|
||||||
|
|
||||||
|
@ -47,11 +47,7 @@ public slots:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
void hideEvent(QHideEvent *event) override
|
void hideEvent(QHideEvent *event) override;
|
||||||
{
|
|
||||||
userList_->clear();
|
|
||||||
QFrame::hideEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel *topLabel_;
|
QLabel *topLabel_;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
|
#include <QEvent>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
#include <QImageReader>
|
#include <QImageReader>
|
||||||
|
@ -41,6 +42,17 @@ constexpr int WIDGET_SPACING = 15;
|
||||||
constexpr int TEXT_SPACING = 4;
|
constexpr int TEXT_SPACING = 4;
|
||||||
constexpr int BUTTON_SPACING = 2 * TEXT_SPACING;
|
constexpr int BUTTON_SPACING = 2 * TEXT_SPACING;
|
||||||
|
|
||||||
|
bool
|
||||||
|
ClickableFilter::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
{
|
||||||
|
if (event->type() == QEvent::MouseButtonRelease) {
|
||||||
|
emit clicked();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QObject::eventFilter(obj, event);
|
||||||
|
}
|
||||||
|
|
||||||
EditModal::EditModal(const QString &roomId, QWidget *parent)
|
EditModal::EditModal(const QString &roomId, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, roomId_{roomId}
|
, roomId_{roomId}
|
||||||
|
@ -93,6 +105,28 @@ EditModal::EditModal(const QString &roomId, QWidget *parent)
|
||||||
move(center.x() - (width() * 0.5), center.y() - (height() * 0.5));
|
move(center.x() - (width() * 0.5), center.y() - (height() * 0.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
EditModal::topicEventSent()
|
||||||
|
{
|
||||||
|
errorField_->hide();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
EditModal::nameEventSent(const QString &name)
|
||||||
|
{
|
||||||
|
errorField_->hide();
|
||||||
|
emit nameChanged(name);
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
EditModal::error(const QString &msg)
|
||||||
|
{
|
||||||
|
errorField_->setText(msg);
|
||||||
|
errorField_->show();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
EditModal::applyClicked()
|
EditModal::applyClicked()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QEvent>
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QLabel>
|
|
||||||
|
|
||||||
#include <mtx/events/guest_access.hpp>
|
#include <mtx/events/guest_access.hpp>
|
||||||
|
|
||||||
|
@ -21,6 +19,8 @@ class QPixmap;
|
||||||
class TextField;
|
class TextField;
|
||||||
class TextField;
|
class TextField;
|
||||||
class Toggle;
|
class Toggle;
|
||||||
|
class QLabel;
|
||||||
|
class QEvent;
|
||||||
|
|
||||||
class ClickableFilter : public QObject
|
class ClickableFilter : public QObject
|
||||||
{
|
{
|
||||||
|
@ -35,15 +35,7 @@ signals:
|
||||||
void clicked();
|
void clicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *obj, QEvent *event) override
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||||
{
|
|
||||||
if (event->type() == QEvent::MouseButtonRelease) {
|
|
||||||
emit clicked();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QObject::eventFilter(obj, event);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Convenience class which connects events emmited from threads
|
/// Convenience class which connects events emmited from threads
|
||||||
|
@ -72,24 +64,9 @@ signals:
|
||||||
void nameChanged(const QString &roomName);
|
void nameChanged(const QString &roomName);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void topicEventSent()
|
void topicEventSent();
|
||||||
{
|
void nameEventSent(const QString &name);
|
||||||
errorField_->hide();
|
void error(const QString &msg);
|
||||||
close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void nameEventSent(const QString &name)
|
|
||||||
{
|
|
||||||
errorField_->hide();
|
|
||||||
emit nameChanged(name);
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void error(const QString &msg)
|
|
||||||
{
|
|
||||||
errorField_->setText(msg);
|
|
||||||
errorField_->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void applyClicked();
|
void applyClicked();
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,12 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QListView>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,14 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QLabel>
|
|
||||||
#include <QLayout>
|
|
||||||
#include <QListView>
|
|
||||||
#include <QStandardItemModel>
|
|
||||||
|
|
||||||
#include "ItemDelegate.h"
|
#include "ItemDelegate.h"
|
||||||
|
|
||||||
|
class QLabel;
|
||||||
|
class QListView;
|
||||||
|
class QStandardItemModel;
|
||||||
|
class QVBoxLayout;
|
||||||
|
|
||||||
namespace emoji {
|
namespace emoji {
|
||||||
|
|
||||||
class Category : public QWidget
|
class Category : public QWidget
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <QLabel>
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "../AvatarProvider.h"
|
#include "../AvatarProvider.h"
|
||||||
|
@ -10,6 +7,8 @@
|
||||||
|
|
||||||
class Avatar;
|
class Avatar;
|
||||||
struct SearchResult;
|
struct SearchResult;
|
||||||
|
class QLabel;
|
||||||
|
class QHBoxLayout;
|
||||||
|
|
||||||
class PopupItem : public QWidget
|
class PopupItem : public QWidget
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "CacheStructs.h"
|
#include "CacheStructs.h"
|
||||||
|
|
Loading…
Reference in a new issue