mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Rebase on master
This commit is contained in:
parent
cc9edf6f90
commit
33a33ef051
2
qtox.pro
2
qtox.pro
|
@ -38,7 +38,7 @@ FORMS += \
|
|||
|
||||
CONFIG += c++11
|
||||
|
||||
QMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
|
||||
QMAKE_CXXFLAGS += -fno-exceptions
|
||||
|
||||
# Rules for creating/updating {ts|qm}-files
|
||||
include(translations/i18n.pri)
|
||||
|
|
|
@ -1369,7 +1369,7 @@ QString Settings::getCircleName(int id) const
|
|||
void Settings::setCircleName(int id, const QString &name)
|
||||
{
|
||||
circleLst[id].name = name;
|
||||
save();
|
||||
savePersonal();
|
||||
}
|
||||
|
||||
int Settings::addCircle(const QString &name)
|
||||
|
@ -1390,7 +1390,7 @@ bool Settings::getCircleExpanded(int id) const
|
|||
void Settings::setCircleExpanded(int id, bool expanded)
|
||||
{
|
||||
circleLst[id].expanded = expanded;
|
||||
save();
|
||||
savePersonal();
|
||||
}
|
||||
|
||||
int Settings::removeCircle(int id)
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
*/
|
||||
|
||||
#include "circlewidget.h"
|
||||
#include "src/misc/style.h"
|
||||
#include "src/misc/settings.h"
|
||||
#include "src/widget/style.h"
|
||||
#include "src/persistence/settings.h"
|
||||
#include "src/friendlist.h"
|
||||
#include "src/friend.h"
|
||||
#include "friendwidget.h"
|
||||
#include "friendlistlayout.h"
|
||||
#include "friendlistwidget.h"
|
||||
#include "croppinglabel.h"
|
||||
#include "src/widget/tool/croppinglabel.h"
|
||||
#include "widget.h"
|
||||
#include <QVariant>
|
||||
#include <QLabel>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "friendlistlayout.h"
|
||||
#include "src/friend.h"
|
||||
#include "src/friendlist.h"
|
||||
#include "src/misc/settings.h"
|
||||
#include "src/persistence/settings.h"
|
||||
#include "friendwidget.h"
|
||||
#include "groupwidget.h"
|
||||
#include "circlewidget.h"
|
||||
|
@ -123,7 +123,7 @@ void FriendListWidget::renameCircleWidget(const QString &newName)
|
|||
{
|
||||
assert(sender() != nullptr);
|
||||
|
||||
CircleWidget* circleWidget = dynamic_cast<CircleWidget*>(sender());
|
||||
CircleWidget* circleWidget = static_cast<CircleWidget*>(sender());
|
||||
assert(circleWidget != nullptr);
|
||||
|
||||
// Rename after removing so you can find it successfully.
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
*/
|
||||
|
||||
#include "genericchatitemwidget.h"
|
||||
#include "src/misc/style.h"
|
||||
#include "src/misc/settings.h"
|
||||
#include "croppinglabel.h"
|
||||
#include "src/widget/style.h"
|
||||
#include "src/persistence/settings.h"
|
||||
#include "src/widget/tool/croppinglabel.h"
|
||||
#include <QVariant>
|
||||
|
||||
GenericChatItemWidget::GenericChatItemWidget(QWidget *parent)
|
||||
|
@ -24,7 +24,6 @@ GenericChatItemWidget::GenericChatItemWidget(QWidget *parent)
|
|||
setProperty("compact", Settings::getInstance().getCompactLayout());
|
||||
|
||||
nameLabel = new CroppingLabel(this);
|
||||
nameLabel->setObjectName("name");
|
||||
nameLabel->setTextFormat(Qt::PlainText);
|
||||
}
|
||||
|
||||
|
@ -36,7 +35,6 @@ bool GenericChatItemWidget::isCompact() const
|
|||
void GenericChatItemWidget::setCompact(bool compact)
|
||||
{
|
||||
this->compact = compact;
|
||||
Style::repolish(this);
|
||||
}
|
||||
|
||||
QString GenericChatItemWidget::getName() const
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <QMouseEvent>
|
||||
|
||||
GenericChatroomWidget::GenericChatroomWidget(QWidget *parent)
|
||||
: QFrame(parent), compact{Settings::getInstance().getCompactLayout()},
|
||||
: GenericChatItemWidget(parent), compact{Settings::getInstance().getCompactLayout()},
|
||||
active{false}
|
||||
{
|
||||
// avatar
|
||||
|
@ -39,6 +39,9 @@ GenericChatroomWidget::GenericChatroomWidget(QWidget *parent)
|
|||
statusMessageLabel->setTextFormat(Qt::PlainText);
|
||||
statusMessageLabel->setForegroundRole(QPalette::WindowText);
|
||||
|
||||
nameLabel->setTextFormat(Qt::PlainText);
|
||||
nameLabel->setForegroundRole(QPalette::WindowText);
|
||||
|
||||
setAutoFillBackground(true);
|
||||
reloadTheme();
|
||||
setCompact(compact);
|
||||
|
|
|
@ -31,12 +31,11 @@ namespace Ui {
|
|||
class MainWindow;
|
||||
}
|
||||
|
||||
class GenericChatroomWidget : public QFrame
|
||||
class GenericChatroomWidget : public GenericChatItemWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GenericChatroomWidget(QWidget *parent = 0);
|
||||
void mouseReleaseEvent (QMouseEvent* event);
|
||||
|
||||
virtual void setAsActiveChatroom(){;}
|
||||
virtual void setAsInactiveChatroom(){;}
|
||||
|
@ -51,7 +50,6 @@ public:
|
|||
void setName(const QString& name);
|
||||
void setStatusMsg(const QString& status);
|
||||
|
||||
QString getName() const;
|
||||
QString getStatusMsg() const;
|
||||
|
||||
void reloadTheme();
|
||||
|
@ -60,7 +58,6 @@ public:
|
|||
|
||||
public slots:
|
||||
void setCompact(bool compact);
|
||||
void onCompactChanged(bool compact);
|
||||
|
||||
signals:
|
||||
void chatroomWidgetClicked(GenericChatroomWidget* widget);
|
||||
|
|
|
@ -48,8 +48,6 @@ protected:
|
|||
virtual void dragEnterEvent(QDragEnterEvent* ev) override;
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent* ev);
|
||||
virtual void dropEvent(QDropEvent* ev) override;
|
||||
virtual void keyPressEvent(QKeyEvent* ev);
|
||||
virtual void keyReleaseEvent(QKeyEvent* ev);
|
||||
|
||||
public:
|
||||
int groupId;
|
||||
|
|
|
@ -51,7 +51,6 @@ protected:
|
|||
virtual QSize sizeHint() const final override;
|
||||
virtual QSize minimumSizeHint() const final override;
|
||||
virtual void mouseReleaseEvent(QMouseEvent *e) final override;
|
||||
virtual bool eventFilter(QObject *obj, QEvent *e) final override;
|
||||
|
||||
private slots:
|
||||
void finishTextEdit();
|
||||
|
|
Loading…
Reference in New Issue
Block a user