mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Fixed Xcode build, improved project folders (similar to MSVC), warnings fixed.
This commit is contained in:
@@ -2901,12 +2901,12 @@ public:
|
||||
return _create(history, newItem, date);
|
||||
}
|
||||
|
||||
HistoryTextState getState(int x, int y, HistoryStateRequest request) const;
|
||||
HistoryTextState getState(int x, int y, HistoryStateRequest request) const override;
|
||||
|
||||
QString selectedText(uint32 selection) const {
|
||||
QString selectedText(TextSelection selection) const override {
|
||||
return QString();
|
||||
}
|
||||
HistoryItemType type() const {
|
||||
HistoryItemType type() const override {
|
||||
return HistoryItemGroup;
|
||||
}
|
||||
void uniteWith(MsgId minId, MsgId maxId, int32 count);
|
||||
@@ -2950,13 +2950,13 @@ public:
|
||||
return _create(history, wasMinId, date);
|
||||
}
|
||||
|
||||
void draw(Painter &p, const QRect &r, TextSelection selection, uint64 ms) const;
|
||||
HistoryTextState getState(int x, int y, HistoryStateRequest request) const;
|
||||
void draw(Painter &p, const QRect &r, TextSelection selection, uint64 ms) const override;
|
||||
HistoryTextState getState(int x, int y, HistoryStateRequest request) const override;
|
||||
|
||||
QString selectedText(uint32 selection) const {
|
||||
QString selectedText(TextSelection selection) const override {
|
||||
return QString();
|
||||
}
|
||||
HistoryItemType type() const {
|
||||
HistoryItemType type() const override {
|
||||
return HistoryItemCollapse;
|
||||
}
|
||||
MsgId wasMinId() const {
|
||||
|
@@ -37,7 +37,6 @@ class TopBarWidget;
|
||||
|
||||
class MainWindow;
|
||||
class ApiWrap;
|
||||
class MainWidget;
|
||||
class ConfirmBox;
|
||||
class DialogsWidget;
|
||||
class HistoryWidget;
|
||||
@@ -550,12 +549,12 @@ private:
|
||||
|
||||
ChildWidget<DialogsWidget> _dialogs;
|
||||
ChildWidget<HistoryWidget> _history;
|
||||
ChildWidget<ProfileWidget> _profile = nullptr;
|
||||
ChildWidget<OverviewWidget> _overview = nullptr;
|
||||
ChildWidget<ProfileWidget> _profile = { nullptr };
|
||||
ChildWidget<OverviewWidget> _overview = { nullptr };
|
||||
ChildWidget<PlayerWidget> _player;
|
||||
ChildWidget<Window::TopBarWidget> _topBar;
|
||||
ConfirmBox *_forwardConfirm = nullptr; // for single column layout
|
||||
ChildWidget<HistoryHider> _hider = nullptr;
|
||||
ChildWidget<HistoryHider> _hider = { nullptr };
|
||||
StackItems _stack;
|
||||
PeerData *_peerInStack = nullptr;
|
||||
MsgId _msgIdInStack = 0;
|
||||
|
@@ -21,6 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||
#include "mainwindow.h"
|
||||
#include "mainwidget.h"
|
||||
#include "application.h"
|
||||
#include "playerwidget.h"
|
||||
|
||||
#include "lang.h"
|
||||
|
||||
|
@@ -21,13 +21,30 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||
|
||||
#define NOMINMAX // no min() and max() macro declarations
|
||||
#define __HUGE
|
||||
#define __STDC_FORMAT_MACROS // fix breakpad for mac
|
||||
|
||||
// Fix Google Breakpad build for Mac App Store version
|
||||
#ifdef Q_OS_MAC
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <cmath>
|
||||
|
||||
// False positive warning in clang for QMap member function value:
|
||||
// const T QMap<Key, T>::value(const Key &akey, const T &adefaultValue)
|
||||
// fires with "Returning address of local temporary object" which is not true.
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreturn-stack-address"
|
||||
#endif // __clang__
|
||||
|
||||
#include <QtCore/QtCore>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif // __clang__
|
||||
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <QtNetwork/QtNetwork>
|
||||
|
||||
|
@@ -31,14 +31,14 @@ public:
|
||||
|
||||
FlatInput(QWidget *parent, const style::flatInput &st, const QString &ph = QString(), const QString &val = QString());
|
||||
|
||||
bool event(QEvent *e);
|
||||
bool event(QEvent *e) override;
|
||||
void touchEvent(QTouchEvent *e);
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void focusInEvent(QFocusEvent *e);
|
||||
void focusOutEvent(QFocusEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void focusInEvent(QFocusEvent *e) override;
|
||||
void focusOutEvent(QFocusEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
void notaBene();
|
||||
|
||||
@@ -52,8 +52,8 @@ public:
|
||||
|
||||
void step_appearance(float64 ms, bool timer);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
void customUpDown(bool isCustom);
|
||||
const QString &getLastText() const {
|
||||
@@ -507,14 +507,14 @@ public:
|
||||
|
||||
MaskedInputField(QWidget *parent, const style::InputField &st, const QString &placeholder = QString(), const QString &val = QString());
|
||||
|
||||
bool event(QEvent *e);
|
||||
bool event(QEvent *e) override;
|
||||
void touchEvent(QTouchEvent *e);
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void focusInEvent(QFocusEvent *e);
|
||||
void focusOutEvent(QFocusEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void focusInEvent(QFocusEvent *e) override;
|
||||
void focusOutEvent(QFocusEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
void showError();
|
||||
|
||||
@@ -528,8 +528,8 @@ public:
|
||||
void step_placeholderShift(float64 ms, bool timer);
|
||||
void step_border(float64 ms, bool timer);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
void customUpDown(bool isCustom);
|
||||
const QString &getLastText() const {
|
||||
|
@@ -35,16 +35,16 @@ public:
|
||||
|
||||
FlatTextarea(QWidget *parent, const style::flatTextarea &st, const QString &ph = QString(), const QString &val = QString());
|
||||
|
||||
bool viewportEvent(QEvent *e);
|
||||
bool viewportEvent(QEvent *e) override;
|
||||
void touchEvent(QTouchEvent *e);
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void focusInEvent(QFocusEvent *e);
|
||||
void focusOutEvent(QFocusEvent *e);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void dropEvent(QDropEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void focusInEvent(QFocusEvent *e) override;
|
||||
void focusOutEvent(QFocusEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
void dropEvent(QDropEvent *e) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
void setMaxLength(int32 maxLength);
|
||||
void setMinHeight(int32 minHeight);
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
|
||||
void step_appearance(float64 ms, bool timer);
|
||||
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const override;
|
||||
QSize minimumSizeHint() const override;
|
||||
|
||||
EmojiPtr getSingleEmoji() const;
|
||||
QString getMentionHashtagBotCommandPart(bool &start) const;
|
||||
@@ -82,9 +82,9 @@ public:
|
||||
void parseLinks();
|
||||
QStringList linksList() const;
|
||||
|
||||
void insertFromMimeData(const QMimeData *source);
|
||||
void insertFromMimeData(const QMimeData *source) override;
|
||||
|
||||
QMimeData *createMimeDataFromSelection() const;
|
||||
QMimeData *createMimeDataFromSelection() const override;
|
||||
|
||||
enum class SubmitSettings {
|
||||
None,
|
||||
@@ -125,7 +125,7 @@ protected:
|
||||
|
||||
void insertEmoji(EmojiPtr emoji, QTextCursor c);
|
||||
|
||||
QVariant loadResource(int type, const QUrl &name);
|
||||
QVariant loadResource(int type, const QUrl &name) override;
|
||||
|
||||
void checkContentHeight();
|
||||
|
||||
|
@@ -138,6 +138,9 @@ public:
|
||||
};
|
||||
Q_DECLARE_FLAGS(Flags, Flag);
|
||||
|
||||
StateRequest() {
|
||||
}
|
||||
|
||||
style::align align = style::al_left;
|
||||
Flags flags = Flag::LookupLink;
|
||||
};
|
||||
|
@@ -174,7 +174,7 @@ class TWidget : public QWidget {
|
||||
public:
|
||||
TWidget(QWidget *parent = nullptr) : QWidget(parent) {
|
||||
}
|
||||
bool event(QEvent *e) {
|
||||
bool event(QEvent *e) override {
|
||||
return QWidget::event(e);
|
||||
}
|
||||
virtual void grabStart() {
|
||||
@@ -233,6 +233,7 @@ class ChildWidget {
|
||||
public:
|
||||
ChildWidget(std::nullptr_t) : _widget(nullptr) {
|
||||
}
|
||||
|
||||
// No default constructor, but constructors with at least
|
||||
// one argument are simply make functions.
|
||||
template <typename Parent, typename... Args>
|
||||
|
Reference in New Issue
Block a user