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"
|
||||
|
||||
class RippleOverlay;
|
||||
class QPainter;
|
||||
class QMouseEvent;
|
||||
|
||||
class CommunitiesListItem : public QWidget
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "InviteeItem.h"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <QLabel>
|
||||
#include <QWidget>
|
||||
|
||||
#include <mtx/identifiers.hpp>
|
||||
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
|
||||
class InviteeItem : public QWidget
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QLabel>
|
||||
#include <QPainter>
|
||||
#include <QStyleOption>
|
||||
|
||||
|
@ -118,7 +119,7 @@ LoginPage::LoginPage(QWidget *parent)
|
|||
deviceName_->setLabel(tr("Device name"));
|
||||
deviceName_->setToolTip(
|
||||
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_->setLabel("Homeserver address");
|
||||
|
@ -179,6 +180,12 @@ LoginPage::LoginPage(QWidget *parent)
|
|||
connect(serverInput_, SIGNAL(editingFinished()), this, SLOT(onServerAddressEntered()));
|
||||
}
|
||||
|
||||
void
|
||||
LoginPage::loginError(const QString &msg)
|
||||
{
|
||||
error_label_->setText(msg);
|
||||
}
|
||||
|
||||
void
|
||||
LoginPage::onMatrixIdEntered()
|
||||
{
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QWidget>
|
||||
|
||||
class FlatButton;
|
||||
|
@ -26,6 +24,9 @@ class LoadingIndicator;
|
|||
class OverlayModal;
|
||||
class RaisedButton;
|
||||
class TextField;
|
||||
class QLabel;
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
|
||||
namespace mtx {
|
||||
namespace responses {
|
||||
|
@ -65,7 +66,7 @@ protected:
|
|||
|
||||
public slots:
|
||||
// Displays errors produced during the login.
|
||||
void loginError(const QString &msg) { error_label_->setText(msg); }
|
||||
void loginError(const QString &msg);
|
||||
|
||||
private slots:
|
||||
// Callback for the back button.
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QLabel>
|
||||
#include <QMetaType>
|
||||
#include <QPainter>
|
||||
#include <QStyleOption>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QWidget>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <mtx/user_interactive.hpp>
|
||||
|
@ -26,6 +26,9 @@
|
|||
class FlatButton;
|
||||
class RaisedButton;
|
||||
class TextField;
|
||||
class QLabel;
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
|
||||
class RegisterPage : public QWidget
|
||||
{
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QScroller>
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QTimer>
|
||||
|
||||
#include "Logging.h"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include <QIcon>
|
||||
#include <QPainter>
|
||||
#include <QResizeEvent>
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
|
||||
#include <mtx/requests.hpp>
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ class Menu;
|
|||
class TextLabel;
|
||||
class OverlayModal;
|
||||
|
||||
class QPainter;
|
||||
class QLabel;
|
||||
class QHBoxLayout;
|
||||
class QVBoxLayout;
|
||||
|
|
|
@ -16,7 +16,10 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QLabel>
|
||||
#include <QPainter>
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QTimer>
|
||||
|
||||
#include <iostream>
|
||||
|
|
|
@ -17,13 +17,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QWidget>
|
||||
|
||||
class Avatar;
|
||||
class FlatButton;
|
||||
class OverlayModal;
|
||||
|
||||
class QLabel;
|
||||
class QHBoxLayout;
|
||||
class QVBoxLayout;
|
||||
|
||||
class UserInfoWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
@ -17,17 +17,18 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QFontDatabase>
|
||||
#include <QFormLayout>
|
||||
#include <QFrame>
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QSharedPointer>
|
||||
#include <QWidget>
|
||||
|
||||
class Toggle;
|
||||
class QLabel;
|
||||
class QFormLayout;
|
||||
class QComboBox;
|
||||
class QHBoxLayout;
|
||||
class QVBoxLayout;
|
||||
|
||||
constexpr int OptionMargin = 6;
|
||||
constexpr int LayoutTopMargin = 50;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <QDebug>
|
||||
#include <QIcon>
|
||||
#include <QLabel>
|
||||
#include <QListWidget>
|
||||
#include <QListWidgetItem>
|
||||
#include <QPushButton>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <QFrame>
|
||||
#include <QLabel>
|
||||
#include <QListWidgetItem>
|
||||
#include <QStringList>
|
||||
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
class TextField;
|
||||
class QListWidget;
|
||||
class QListWidgetItem;
|
||||
|
||||
namespace dialogs {
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <QDebug>
|
||||
#include <QIcon>
|
||||
#include <QLabel>
|
||||
#include <QListWidgetItem>
|
||||
#include <QPainter>
|
||||
#include <QPushButton>
|
||||
|
@ -163,3 +164,10 @@ ReadReceipts::paintEvent(QPaintEvent *)
|
|||
QPainter 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 <QFrame>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QListWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
class Avatar;
|
||||
class QLabel;
|
||||
class QListWidget;
|
||||
class QHBoxLayout;
|
||||
class QVBoxLayout;
|
||||
|
||||
namespace dialogs {
|
||||
|
||||
|
@ -47,11 +47,7 @@ public slots:
|
|||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
void hideEvent(QHideEvent *event) override
|
||||
{
|
||||
userList_->clear();
|
||||
QFrame::hideEvent(event);
|
||||
}
|
||||
void hideEvent(QHideEvent *event) override;
|
||||
|
||||
private:
|
||||
QLabel *topLabel_;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
#include <QEvent>
|
||||
#include <QFileDialog>
|
||||
#include <QFontDatabase>
|
||||
#include <QImageReader>
|
||||
|
@ -41,6 +42,17 @@ constexpr int WIDGET_SPACING = 15;
|
|||
constexpr int TEXT_SPACING = 4;
|
||||
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)
|
||||
: QWidget(parent)
|
||||
, roomId_{roomId}
|
||||
|
@ -93,6 +105,28 @@ EditModal::EditModal(const QString &roomId, QWidget *parent)
|
|||
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
|
||||
EditModal::applyClicked()
|
||||
{
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <QEvent>
|
||||
#include <QFrame>
|
||||
#include <QImage>
|
||||
#include <QLabel>
|
||||
|
||||
#include <mtx/events/guest_access.hpp>
|
||||
|
||||
|
@ -21,6 +19,8 @@ class QPixmap;
|
|||
class TextField;
|
||||
class TextField;
|
||||
class Toggle;
|
||||
class QLabel;
|
||||
class QEvent;
|
||||
|
||||
class ClickableFilter : public QObject
|
||||
{
|
||||
|
@ -35,15 +35,7 @@ signals:
|
|||
void clicked();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *obj, QEvent *event) override
|
||||
{
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
emit clicked();
|
||||
return true;
|
||||
}
|
||||
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
};
|
||||
|
||||
/// Convenience class which connects events emmited from threads
|
||||
|
@ -72,24 +64,9 @@ signals:
|
|||
void nameChanged(const QString &roomName);
|
||||
|
||||
private slots:
|
||||
void topicEventSent()
|
||||
{
|
||||
errorField_->hide();
|
||||
close();
|
||||
}
|
||||
|
||||
void nameEventSent(const QString &name)
|
||||
{
|
||||
errorField_->hide();
|
||||
emit nameChanged(name);
|
||||
close();
|
||||
}
|
||||
|
||||
void error(const QString &msg)
|
||||
{
|
||||
errorField_->setText(msg);
|
||||
errorField_->show();
|
||||
}
|
||||
void topicEventSent();
|
||||
void nameEventSent(const QString &name);
|
||||
void error(const QString &msg);
|
||||
|
||||
void applyClicked();
|
||||
|
||||
|
|
|
@ -15,9 +15,12 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QLabel>
|
||||
#include <QListView>
|
||||
#include <QPainter>
|
||||
#include <QScrollBar>
|
||||
#include <QStyleOption>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
|
|
|
@ -18,13 +18,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <QColor>
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QListView>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include "ItemDelegate.h"
|
||||
|
||||
class QLabel;
|
||||
class QListView;
|
||||
class QStandardItemModel;
|
||||
class QVBoxLayout;
|
||||
|
||||
namespace emoji {
|
||||
|
||||
class Category : public QWidget
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <QLabel>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QStyleOption>
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPoint>
|
||||
#include <QWidget>
|
||||
|
||||
#include "../AvatarProvider.h"
|
||||
|
@ -10,6 +7,8 @@
|
|||
|
||||
class Avatar;
|
||||
struct SearchResult;
|
||||
class QLabel;
|
||||
class QHBoxLayout;
|
||||
|
||||
class PopupItem : public QWidget
|
||||
{
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPoint>
|
||||
#include <QWidget>
|
||||
|
||||
#include "CacheStructs.h"
|
||||
|
|
Loading…
Reference in a new issue