1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

style: Fix style of a lot of pointers

This commit is contained in:
Diadlo 2017-01-06 14:02:54 +03:00
parent 7d1564e586
commit fcd8eed7cd
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
80 changed files with 121 additions and 123 deletions

View File

@ -58,7 +58,7 @@ QRectF ChatLineContentProxy::boundingRect() const
return result;
}
void ChatLineContentProxy::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
void ChatLineContentProxy::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
{
painter->setClipRect(boundingRect());
proxy->paint(painter, option, widget);
@ -69,7 +69,7 @@ qreal ChatLineContentProxy::getAscent() const
return 7.0;
}
QWidget *ChatLineContentProxy::getWidget() const
QWidget* ChatLineContentProxy::getWidget() const
{
return proxy->widget();
}

View File

@ -42,7 +42,7 @@ public:
QRectF boundingRect() const override;
void setWidth(qreal width) override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
qreal getAscent() const override;
QWidget* getWidget() const;

View File

@ -882,7 +882,7 @@ bool ChatLog::isActiveFileTransfer(ChatLine::Ptr l)
if (!proxy)
continue;
QWidget *widget = proxy->getWidget();
QWidget* widget = proxy->getWidget();
FileTransferWidget *transferWidget = qobject_cast<FileTransferWidget*>(widget);
if (transferWidget && transferWidget->isActive())
return true;

View File

@ -40,7 +40,7 @@
#include <math.h>
FileTransferWidget::FileTransferWidget(QWidget *parent, ToxFile file)
FileTransferWidget::FileTransferWidget(QWidget* parent, ToxFile file)
: QWidget(parent)
, ui(new Ui::FileTransferWidget)
, fileInfo(file)

View File

@ -39,7 +39,7 @@ class FileTransferWidget : public QWidget
Q_OBJECT
public:
explicit FileTransferWidget(QWidget *parent, ToxFile file);
explicit FileTransferWidget(QWidget* parent, ToxFile file);
virtual ~FileTransferWidget();
void autoAcceptTransfer(const QString& path);
bool isActive() const;

View File

@ -30,7 +30,7 @@ public:
Image(QSize size, const QString &filename);
virtual QRectF boundingRect() const override;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
virtual void setWidth(qreal width) override;
virtual qreal getAscent() const override;

View File

@ -43,7 +43,7 @@ QRectF NotificationIcon::boundingRect() const
return QRectF(QPointF(-size.width() / 2.0, -size.height() / 2.0), size);
}
void NotificationIcon::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
void NotificationIcon::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
{
painter->setClipRect(boundingRect());

View File

@ -34,7 +34,7 @@ public:
explicit NotificationIcon(QSize size);
virtual QRectF boundingRect() const override;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
virtual void setWidth(qreal width) override;
virtual qreal getAscent() const override;

View File

@ -35,7 +35,7 @@ public:
Spinner(const QString& img, QSize size, qreal speed);
virtual QRectF boundingRect() const override;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
virtual void setWidth(qreal width) override;
virtual void visibilityChanged(bool visible) override;
virtual qreal getAscent() const override;

View File

@ -47,7 +47,7 @@ public:
virtual QString getSelectedText() const final;
virtual QRectF boundingRect() const final;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) final;
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) final;
virtual void visibilityChanged(bool keepInMemory) final;

View File

@ -72,7 +72,7 @@ Friend* FriendList::findFriend(const ToxPk& friendPk)
auto id = key2id.find(friendPk.getKey());
if (id != key2id.end())
{
Friend *f = findFriend(*id);
Friend* f = findFriend(*id);
if (!f)
return nullptr;
if (f->getPublicKey() == friendPk)

View File

@ -53,7 +53,7 @@ void Group::updatePeer(int peerId, QString name)
peers[peerId] = name;
toxids[peerPk] = name;
Friend *f = FriendList::findFriend(peerKey);
Friend* f = FriendList::findFriend(peerKey);
if (f != nullptr && f->hasAlias())
{
peers[peerId] = f->getDisplayedName();
@ -100,7 +100,7 @@ void Group::regeneratePeerList()
if (toxids[peerPk].isEmpty())
toxids[peerPk] = tr("<Empty>", "Placeholder when someone's name in a group chat is empty");
Friend *f = FriendList::findFriend(id);
Friend* f = FriendList::findFriend(id);
if (f != nullptr && f->hasAlias())
{
peers[i] = f->getDisplayedName();

View File

@ -82,7 +82,7 @@ bool handleToxURI(const QString &toxURI)
return true;
}
ToxURIDialog::ToxURIDialog(QWidget *parent, const QString &userId, const QString &message) :
ToxURIDialog::ToxURIDialog(QWidget* parent, const QString &userId, const QString &message) :
QDialog(parent)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

View File

@ -33,7 +33,7 @@ class ToxURIDialog : public QDialog
{
Q_OBJECT
public:
explicit ToxURIDialog(QWidget *parent, const QString &userId, const QString &message);
explicit ToxURIDialog(QWidget* parent, const QString &userId, const QString &message);
QString getRequestMessage();
private:

View File

@ -38,7 +38,7 @@
const int OfflineMsgEngine::offlineTimeout = 20000;
QMutex OfflineMsgEngine::globalMutex;
OfflineMsgEngine::OfflineMsgEngine(Friend *frnd) :
OfflineMsgEngine::OfflineMsgEngine(Friend* frnd) :
mutex(QMutex::Recursive),
f(frnd)
{

View File

@ -23,7 +23,7 @@
#include <QFrame>
#include <QPushButton>
GenericNetCamView::GenericNetCamView(QWidget *parent)
GenericNetCamView::GenericNetCamView(QWidget* parent)
: QWidget(parent)
{
verLayout = new QVBoxLayout(this);

View File

@ -107,7 +107,7 @@ private:
VideoSurface* videoSurface;
};
GroupNetCamView::GroupNetCamView(int group, QWidget *parent)
GroupNetCamView::GroupNetCamView(int group, QWidget* parent)
: GenericNetCamView(parent)
, group(group)
{

View File

@ -34,7 +34,7 @@ class NetCamView : public GenericNetCamView
Q_OBJECT
public:
NetCamView(int friendId, QWidget *parent=0);
NetCamView(int friendId, QWidget* parent=0);
~NetCamView();
virtual void show(VideoSource* source, const QString& title);

View File

@ -8,7 +8,7 @@
#include <QFileDialog>
#include <QMessageBox>
AboutUser::AboutUser(ToxPk &toxId, QWidget *parent) :
AboutUser::AboutUser(ToxPk &toxId, QWidget* parent) :
QDialog(parent),
ui(new Ui::AboutUser)
{
@ -34,7 +34,7 @@ AboutUser::AboutUser(ToxPk &toxId, QWidget *parent) :
ui->selectSaveDir->setText(Settings::getInstance().getAutoAcceptDir(this->friendPk));
}
void AboutUser::setFriend(Friend *f)
void AboutUser::setFriend(Friend* f)
{
this->setWindowTitle(f->getDisplayedName());
ui->userName->setText(f->getDisplayedName());

View File

@ -14,9 +14,9 @@ class AboutUser : public QDialog
Q_OBJECT
public:
explicit AboutUser(ToxPk &toxID, QWidget *parent = 0);
explicit AboutUser(ToxPk &toxID, QWidget* parent = 0);
~AboutUser();
void setFriend(Friend *f);
void setFriend(Friend* f);
private:
Ui::AboutUser *ui;

View File

@ -61,7 +61,7 @@ protected:
void setContainerAttribute(Qt::WidgetAttribute attribute, bool enabled);
QLayout* friendOnlineLayout() const;
QLayout* friendOfflineLayout() const;
void emitChatroomWidget(QLayout *layout, int index);
void emitChatroomWidget(QLayout* layout, int index);
private:
virtual void onSetName() {}

View File

@ -154,7 +154,7 @@ void CircleWidget::contextMenuEvent(QContextMenuEvent* event)
void CircleWidget::dragEnterEvent(QDragEnterEvent* event)
{
ToxId toxId(event->mimeData()->text());
Friend *f = FriendList::findFriend(toxId.getPublicKey());
Friend* f = FriendList::findFriend(toxId.getPublicKey());
if (f != nullptr)
event->acceptProposedAction();
@ -178,7 +178,7 @@ void CircleWidget::dropEvent(QDropEvent* event)
// Check, that the user has a friend with the same ToxId
ToxId toxId(event->mimeData()->text());
Friend *f = FriendList::findFriend(toxId.getPublicKey());
Friend* f = FriendList::findFriend(toxId.getPublicKey());
if (!f)
return;

View File

@ -62,7 +62,7 @@ ContentDialog::ContentDialog(SettingsWidget* settingsWidget, QWidget* parent)
setStyleSheet(Style::getStylesheet(":/ui/contentDialog/contentDialog.css"));
splitter->setHandleWidth(6);
QWidget *friendWidget = new QWidget();
QWidget* friendWidget = new QWidget();
friendWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
friendWidget->setAutoFillBackground(true);

View File

@ -29,7 +29,7 @@ ContentLayout::ContentLayout()
init();
}
ContentLayout::ContentLayout(QWidget *parent)
ContentLayout::ContentLayout(QWidget* parent)
: QVBoxLayout(parent)
{
init();

View File

@ -31,7 +31,7 @@
#include <math.h>
EmoticonsWidget::EmoticonsWidget(QWidget *parent) :
EmoticonsWidget::EmoticonsWidget(QWidget* parent) :
QMenu(parent)
{
setStyleSheet(Style::getStylesheet(":/ui/emoticonWidget/emoticonWidget.css"));

View File

@ -28,7 +28,7 @@ class EmoticonsWidget : public QMenu
{
Q_OBJECT
public:
explicit EmoticonsWidget(QWidget *parent = 0);
explicit EmoticonsWidget(QWidget* parent = 0);
signals:
void insertEmoticon(QString str);

View File

@ -41,7 +41,7 @@
#include <QWidget>
#include "flowlayout.h"
FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
FlowLayout::FlowLayout(QWidget* parent, int margin, int hSpacing, int vSpacing)
: QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing)
{
setContentsMargins(margin, margin, margin, margin);
@ -149,7 +149,7 @@ int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
QLayoutItem *item;
foreach (item, itemList)
{
QWidget *wid = item->widget();
QWidget* wid = item->widget();
int spaceX = horizontalSpacing();
if (spaceX == -1)
spaceX = wid->style()->layoutSpacing(
@ -186,11 +186,11 @@ int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
}
else if (parent->isWidgetType())
{
QWidget *pw = static_cast<QWidget *>(parent);
QWidget* pw = static_cast<QWidget* >(parent);
return pw->style()->pixelMetric(pm, 0, pw);
}
else
{
return static_cast<QLayout *>(parent)->spacing();
return static_cast<QLayout* >(parent)->spacing();
}
}

View File

@ -74,7 +74,7 @@ private slots:
private:
void retranslateUi();
void addFriendRequestWidget(const QString& friendAddress, const QString& message);
void removeFriendRequestWidget(QWidget *friendWidget);
void removeFriendRequestWidget(QWidget* friendWidget);
void retranslateAcceptButton(QPushButton* acceptButton);
void retranslateRejectButton(QPushButton* rejectButton);
void deleteFriendRequest(const ToxId& toxId);
@ -86,7 +86,7 @@ private:
QLineEdit toxId;
QTextEdit message;
QVBoxLayout layout, headLayout;
QWidget *head, *main;
QWidget* head, *main;
QString lastUsername;
QTabWidget* tabWidget;
QVBoxLayout* requestsLayout;

View File

@ -49,7 +49,7 @@
#include "src/widget/translator.h"
#include "src/widget/widget.h"
GenericChatForm::GenericChatForm(QWidget *parent)
GenericChatForm::GenericChatForm(QWidget* parent)
: QWidget(parent, Qt::Window)
, audioInputFlag(false)
, audioOutputFlag(false)
@ -498,7 +498,7 @@ void GenericChatForm::onSelectAllClicked()
QString GenericChatForm::resolveToxId(const ToxPk &id)
{
Friend *f = FriendList::findFriend(id);
Friend* f = FriendList::findFriend(id);
if (f)
return f->getDisplayedName();

View File

@ -55,7 +55,7 @@ class GenericChatForm : public QWidget
{
Q_OBJECT
public:
explicit GenericChatForm(QWidget *parent = 0);
explicit GenericChatForm(QWidget* parent = 0);
~GenericChatForm();
void setName(const QString &newName);
@ -122,7 +122,7 @@ protected:
int curRow;
CroppingLabel *nameLabel;
MaskablePixmapWidget *avatar;
QWidget *headWidget;
QWidget* headWidget;
QPushButton *fileButton, *screenshotButton, *emoteButton, *callButton, *videoButton, *volButton, *micButton;
FlyoutOverlayWidget *fileFlyout;
QVBoxLayout *headTextLayout;

View File

@ -283,7 +283,7 @@ void GroupChatForm::peerAudioPlaying(int peer)
void GroupChatForm::dragEnterEvent(QDragEnterEvent *ev)
{
ToxId toxId = ToxId(ev->mimeData()->text());
Friend *frnd = FriendList::findFriend(toxId.getPublicKey());
Friend* frnd = FriendList::findFriend(toxId.getPublicKey());
if (frnd)
ev->acceptProposedAction();
}
@ -291,7 +291,7 @@ void GroupChatForm::dragEnterEvent(QDragEnterEvent *ev)
void GroupChatForm::dropEvent(QDropEvent *ev)
{
ToxId toxId = ToxId(ev->mimeData()->text());
Friend *frnd = FriendList::findFriend(toxId.getPublicKey());
Friend* frnd = FriendList::findFriend(toxId.getPublicKey());
if (!frnd)
return;

View File

@ -20,7 +20,7 @@
#include "loadhistorydialog.h"
#include "ui_loadhistorydialog.h"
LoadHistoryDialog::LoadHistoryDialog(QWidget *parent) :
LoadHistoryDialog::LoadHistoryDialog(QWidget* parent) :
QDialog(parent),
ui(new Ui::LoadHistoryDialog)
{

View File

@ -32,7 +32,7 @@ class LoadHistoryDialog : public QDialog
Q_OBJECT
public:
explicit LoadHistoryDialog(QWidget *parent = 0);
explicit LoadHistoryDialog(QWidget* parent = 0);
~LoadHistoryDialog();
QDateTime getFromDate();

View File

@ -48,7 +48,7 @@
#include <QMenu>
#include <QMouseEvent>
ProfileForm::ProfileForm(QWidget *parent) :
ProfileForm::ProfileForm(QWidget* parent) :
QWidget{parent}, qr{nullptr}
{
bodyUI = new Ui::IdentitySettings;

View File

@ -55,7 +55,7 @@ class ProfileForm : public QWidget
{
Q_OBJECT
public:
explicit ProfileForm(QWidget *parent = nullptr);
explicit ProfileForm(QWidget* parent = nullptr);
~ProfileForm();
virtual void show() final{}
void show(ContentLayout* contentLayout);
@ -97,7 +97,7 @@ private:
Ui::IdentitySettings* bodyUI;
MaskablePixmapWidget* profilePicture;
QLabel* nameLabel;
QWidget *head;
QWidget* head;
Core* core;
QTimer timer;
bool hasCheck = false;

View File

@ -22,7 +22,7 @@
#include "verticalonlyscroller.h"
VerticalOnlyScroller::VerticalOnlyScroller(QWidget *parent) :
VerticalOnlyScroller::VerticalOnlyScroller(QWidget* parent) :
QScrollArea(parent)
{
}

View File

@ -29,7 +29,7 @@ class VerticalOnlyScroller : public QScrollArea
{
Q_OBJECT
public:
explicit VerticalOnlyScroller(QWidget *parent = 0);
explicit VerticalOnlyScroller(QWidget* parent = 0);
protected:
virtual void resizeEvent(QResizeEvent *event) final override;

View File

@ -82,7 +82,7 @@ void FriendListLayout::moveFriendWidgets(FriendListWidget* listWidget)
QWidget* getWidget = friendOnlineLayout.getLayout()->takeAt(0)->widget();
FriendWidget* friendWidget = qobject_cast<FriendWidget*>(getWidget);
Friend *f = FriendList::findFriend(friendWidget->friendId);
Friend* f = FriendList::findFriend(friendWidget->friendId);
listWidget->moveWidget(friendWidget, f->getStatus(), false);
}
while (!friendOfflineLayout.getLayout()->isEmpty())
@ -90,7 +90,7 @@ void FriendListLayout::moveFriendWidgets(FriendListWidget* listWidget)
QWidget* getWidget = friendOfflineLayout.getLayout()->takeAt(0)->widget();
FriendWidget* friendWidget = qobject_cast<FriendWidget*>(getWidget);
Friend *f = FriendList::findFriend(friendWidget->friendId);
Friend* f = FriendList::findFriend(friendWidget->friendId);
listWidget->moveWidget(friendWidget, f->getStatus(), false);
}
}

View File

@ -202,7 +202,7 @@ void FriendListWidget::setMode(Mode mode)
int count = activityLayout ? activityLayout->count() : 0;
for (int i = 0; i < count; i++)
{
QWidget *widget = activityLayout->itemAt(i)->widget();
QWidget* widget = activityLayout->itemAt(i)->widget();
CategoryWidget *categoryWidget = qobject_cast<CategoryWidget*>(widget);
if (categoryWidget)
{
@ -332,11 +332,11 @@ void FriendListWidget::setMode(Mode mode)
}
}
void FriendListWidget::moveFriends(QLayout *layout)
void FriendListWidget::moveFriends(QLayout* layout)
{
for (int i = 0; i < layout->count(); i++)
{
QWidget *widget = layout->itemAt(i)->widget();
QWidget* widget = layout->itemAt(i)->widget();
FriendWidget *friendWidget = qobject_cast<FriendWidget*>(widget);
CircleWidget *circleWidget = qobject_cast<CircleWidget*>(widget);
if (circleWidget)
@ -350,7 +350,7 @@ void FriendListWidget::moveFriends(QLayout *layout)
QDate activityDate = getDateFriend(contact);
Time time = getTime(activityDate);
QWidget *w = activityLayout->itemAt(time)->widget();
QWidget* w = activityLayout->itemAt(time)->widget();
CategoryWidget* categoryWidget = qobject_cast<CategoryWidget*>(w);
categoryWidget->addFriendWidget(friendWidget, contact->getStatus());
}
@ -413,7 +413,7 @@ void FriendListWidget::addCircleWidget(FriendWidget* friendWidget)
{
if (friendWidget != nullptr)
{
Friend *f = FriendList::findFriend(friendWidget->friendId);
Friend* f = FriendList::findFriend(friendWidget->friendId);
ToxPk toxPk = f->getPublicKey();
int circleId = Settings::getInstance().getFriendCircleID(toxPk);
CircleWidget* circleOriginal = CircleWidget::getFromID(circleId);
@ -640,7 +640,7 @@ void FriendListWidget::cycleContacts(GenericChatroomWidget* activeChatroomWidget
void FriendListWidget::dragEnterEvent(QDragEnterEvent* event)
{
ToxId toxId(event->mimeData()->text());
Friend *frnd = FriendList::findFriend(toxId.getPublicKey());
Friend* frnd = FriendList::findFriend(toxId.getPublicKey());
if (frnd)
event->acceptProposedAction();
}
@ -655,7 +655,7 @@ void FriendListWidget::dropEvent(QDropEvent* event)
// Check, that the user has a friend with the same ToxId
ToxId toxId(event->mimeData()->text());
Friend *f = FriendList::findFriend(toxId.getPublicKey());
Friend* f = FriendList::findFriend(toxId.getPublicKey());
if (!f)
return;
@ -684,7 +684,7 @@ void FriendListWidget::moveWidget(FriendWidget* widget, Status s, bool add)
{
if (mode == Name)
{
Friend *f = FriendList::findFriend(widget->friendId);
Friend* f = FriendList::findFriend(widget->friendId);
int circleId = Settings::getInstance().getFriendCircleID(f->getPublicKey());
CircleWidget* circleWidget = CircleWidget::getFromID(circleId);
@ -704,7 +704,7 @@ void FriendListWidget::moveWidget(FriendWidget* widget, Status s, bool add)
Friend* contact = FriendList::findFriend(widget->friendId);
QDate activityDate = getDateFriend(contact);
Time time = getTime(activityDate);
QWidget *w = activityLayout->itemAt(time)->widget();
QWidget* w = activityLayout->itemAt(time)->widget();
CategoryWidget* categoryWidget = qobject_cast<CategoryWidget*>(w);
categoryWidget->addFriendWidget(widget, contact->getStatus());
categoryWidget->show();

View File

@ -81,7 +81,7 @@ private slots:
private:
CircleWidget* createCircleWidget(int id = -1);
QLayout* nextLayout(QLayout* layout, bool forward) const;
void moveFriends(QLayout *layout);
void moveFriends(QLayout* layout);
Mode mode;
bool groupsOnTop;

View File

@ -77,7 +77,7 @@ FriendWidget::FriendWidget(int FriendId, QString id)
* Default context menu event handler.
* Redirect all event information to the signal.
*/
void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
void FriendWidget::contextMenuEvent(QContextMenuEvent* event)
{
emit contextMenuCalled(event);
}

View File

@ -28,7 +28,7 @@ class FriendWidget : public GenericChatroomWidget
Q_OBJECT
public:
FriendWidget(int FriendId, QString id);
virtual void contextMenuEvent(QContextMenuEvent * event) override;
virtual void contextMenuEvent(QContextMenuEvent* event) override;
virtual void setAsActiveChatroom() override;
virtual void setAsInactiveChatroom() override;
virtual void updateStatusLight() override;

View File

@ -23,7 +23,7 @@
#include "src/widget/tool/croppinglabel.h"
#include <QVariant>
GenericChatItemWidget::GenericChatItemWidget(QWidget *parent)
GenericChatItemWidget::GenericChatItemWidget(QWidget* parent)
: QFrame(parent), compact(false)
{
setProperty("compact", Settings::getInstance().getCompactLayout());

View File

@ -36,7 +36,7 @@ public:
FriendOnlineItem
};
explicit GenericChatItemWidget(QWidget *parent = 0);
explicit GenericChatItemWidget(QWidget* parent = 0);
bool isCompact() const;
void setCompact(bool compact);

View File

@ -25,7 +25,7 @@
#include <QBoxLayout>
#include <QMouseEvent>
GenericChatroomWidget::GenericChatroomWidget(QWidget *parent)
GenericChatroomWidget::GenericChatroomWidget(QWidget* parent)
: GenericChatItemWidget(parent), active{false}
{
// avatar

View File

@ -34,7 +34,7 @@ class GenericChatroomWidget : public GenericChatItemWidget
{
Q_OBJECT
public:
explicit GenericChatroomWidget(QWidget *parent = 0);
explicit GenericChatroomWidget(QWidget* parent = 0);
virtual void setAsActiveChatroom() = 0;
virtual void setAsInactiveChatroom() = 0;

View File

@ -236,7 +236,7 @@ void GroupWidget::resetEventFlags()
void GroupWidget::dragEnterEvent(QDragEnterEvent *ev)
{
ToxId toxId = ToxId(ev->mimeData()->text());
Friend *frnd = FriendList::findFriend(toxId.getPublicKey());
Friend* frnd = FriendList::findFriend(toxId.getPublicKey());
if (frnd)
ev->acceptProposedAction();
@ -253,7 +253,7 @@ void GroupWidget::dragLeaveEvent(QDragLeaveEvent *)
void GroupWidget::dropEvent(QDropEvent *ev)
{
ToxId toxId = ToxId(ev->mimeData()->text());
Friend *frnd = FriendList::findFriend(toxId.getPublicKey());
Friend* frnd = FriendList::findFriend(toxId.getPublicKey());
if (!frnd)
return;

View File

@ -274,11 +274,10 @@ bool GUI::askQuestion(const QString& title, const QString& msg,
* @param hints Is the input method hints that will be used if the combobox is editable and an input method is active.
* @return This function returns the text of the current item, or if editable is true, the current text of the combobox.
*/
QString GUI::itemInputDialog(QWidget * parent, const QString & title,
const QString & label, const QStringList & items,
int current, bool editable, bool * ok,
Qt::WindowFlags flags,
Qt::InputMethodHints hints)
QString GUI::itemInputDialog(QWidget* parent, const QString& title,
const QString& label, const QStringList& items,
int current, bool editable, bool* ok,
Qt::WindowFlags flags, Qt::InputMethodHints hints)
{
if (QThread::currentThread() == qApp->thread())
{
@ -395,11 +394,10 @@ bool GUI::_askQuestion(const QString& title, const QString& msg,
return box.clickedButton() == pushButton1;
}
QString GUI::_itemInputDialog(QWidget * parent, const QString & title,
const QString & label, const QStringList & items,
int current, bool editable, bool * ok,
Qt::WindowFlags flags,
Qt::InputMethodHints hints)
QString GUI::_itemInputDialog(QWidget* parent, const QString& title,
const QString& label, const QStringList& items,
int current, bool editable, bool* ok,
Qt::WindowFlags flags, Qt::InputMethodHints hints)
{
return QInputDialog::getItem(parent, title, label, items, current, editable, ok, flags, hints);
}

View File

@ -47,9 +47,9 @@ public:
const QString& button1, const QString& button2,
bool defaultAns = false, bool warning = true);
static QString itemInputDialog(QWidget * parent, const QString & title,
const QString & label, const QStringList & items,
int current = 0, bool editable = true, bool * ok = 0,
static QString itemInputDialog(QWidget* parent, const QString& title,
const QString& label, const QStringList& items,
int current = 0, bool editable = true, bool* ok = 0,
Qt::WindowFlags flags = 0,
Qt::InputMethodHints hints = Qt::ImhNone);
@ -77,9 +77,9 @@ private slots:
bool _askQuestion(const QString& title, const QString& msg,
const QString& button1, const QString& button2,
bool defaultAns = false, bool warning = true);
QString _itemInputDialog(QWidget * parent, const QString & title,
const QString & label, const QStringList & items,
int current = 0, bool editable = true, bool * ok = 0,
QString _itemInputDialog(QWidget* parent, const QString& title,
const QString& label, const QStringList& items,
int current = 0, bool editable = true, bool* ok = 0,
Qt::WindowFlags flags = 0,
Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
QString _passwordDialog(const QString& cancel, const QString& body);

View File

@ -32,7 +32,7 @@
#include <QToolButton>
#include <QDebug>
LoginScreen::LoginScreen(QWidget *parent) :
LoginScreen::LoginScreen(QWidget* parent) :
QWidget(parent),
ui(new Ui::LoginScreen),
quitShortcut{QKeySequence(Qt::CTRL + Qt::Key_Q), this}

View File

@ -34,7 +34,7 @@ class LoginScreen : public QWidget
Q_OBJECT
public:
explicit LoginScreen(QWidget *parent = 0);
explicit LoginScreen(QWidget* parent = 0);
~LoginScreen();
void reset();

View File

@ -25,7 +25,7 @@
* @brief pointer to dynamically call the constructor.
*/
MaskablePixmapWidget::MaskablePixmapWidget(QWidget *parent, QSize size, QString maskName)
MaskablePixmapWidget::MaskablePixmapWidget(QWidget* parent, QSize size, QString maskName)
: QWidget(parent)
, renderTarget(nullptr)
, maskName(maskName)

View File

@ -26,7 +26,7 @@ class MaskablePixmapWidget final : public QWidget
{
Q_OBJECT
public:
MaskablePixmapWidget(QWidget *parent, QSize size, QString maskName = QString());
MaskablePixmapWidget(QWidget* parent, QSize size, QString maskName = QString());
~MaskablePixmapWidget();
void autopickBackground();
void setClickable(bool clickable);

View File

@ -24,7 +24,7 @@
#include <QDebug>
NotificationEdgeWidget::NotificationEdgeWidget(Position position, QWidget *parent)
NotificationEdgeWidget::NotificationEdgeWidget(Position position, QWidget* parent)
: QWidget(parent)
{
setAttribute(Qt::WA_StyledBackground); // Show background.

View File

@ -34,7 +34,7 @@ public:
Bottom
};
explicit NotificationEdgeWidget(Position position, QWidget *parent = 0);
explicit NotificationEdgeWidget(Position position, QWidget* parent = 0);
void updateNotificationCount(int count);
signals:

View File

@ -195,7 +195,7 @@ void NotificationScrollArea::findPreviousWidget()
ensureWidgetVisible(next, 0, referencesAbove != 1 ? topEdge->height() : 0);
}
NotificationScrollArea::Visibility NotificationScrollArea::widgetVisible(QWidget *widget) const
NotificationScrollArea::Visibility NotificationScrollArea::widgetVisible(QWidget* widget) const
{
int y = widget->mapTo(viewport(), QPoint()).y();

View File

@ -8,7 +8,7 @@ class PasswordEdit : public QLineEdit
{
Q_OBJECT
public:
explicit PasswordEdit(QWidget *parent);
explicit PasswordEdit(QWidget* parent);
~PasswordEdit();
protected:

View File

@ -36,7 +36,7 @@
* @link https://stackoverflow.com/questions/21400254/how-to-draw-a-qr-code-with-qt-in-native-c-c
*/
QRWidget::QRWidget(QWidget *parent) : QWidget(parent), data("0")
QRWidget::QRWidget(QWidget* parent) : QWidget(parent), data("0")
//Note: The encoding fails with empty string so I just default to something else.
//Use the setQRData() call to change this.
{

View File

@ -28,7 +28,7 @@ class QRWidget : public QWidget
Q_OBJECT
public:
explicit QRWidget(QWidget *parent = 0);
explicit QRWidget(QWidget* parent = 0);
~QRWidget();
void setQRData(const QString& data);
QImage* getImage();

View File

@ -182,7 +182,7 @@ QString Style::resolve(QString qss, const QFont& baseFont)
return qss;
}
void Style::repolish(QWidget *w)
void Style::repolish(QWidget* w)
{
w->style()->unpolish(w);
w->style()->polish(w);

View File

@ -21,7 +21,7 @@
#include "activatedialog.h"
#include <QEvent>
ActivateDialog::ActivateDialog(QWidget *parent, Qt::WindowFlags f)
ActivateDialog::ActivateDialog(QWidget* parent, Qt::WindowFlags f)
: QDialog(parent, f)
{

View File

@ -24,7 +24,7 @@
#include <QScrollBar>
#include <QDebug>
AdjustingScrollArea::AdjustingScrollArea(QWidget *parent)
AdjustingScrollArea::AdjustingScrollArea(QWidget* parent)
: QScrollArea(parent)
{

View File

@ -26,7 +26,7 @@ class AdjustingScrollArea : public QScrollArea
{
Q_OBJECT
public:
explicit AdjustingScrollArea(QWidget *parent = 0);
explicit AdjustingScrollArea(QWidget* parent = 0);
virtual ~AdjustingScrollArea() = default;
protected:

View File

@ -51,7 +51,7 @@
* @brief Used to correct the rounding factors on non-square rects
*/
CallConfirmWidget::CallConfirmWidget(const QWidget *Anchor, const Friend& f) :
CallConfirmWidget::CallConfirmWidget(const QWidget* Anchor, const Friend& f) :
QWidget(), anchor(Anchor), f(f),
rectW{120}, rectH{85},
spikeW{30}, spikeH{15},

View File

@ -34,7 +34,7 @@ class CallConfirmWidget final : public QWidget
{
Q_OBJECT
public:
explicit CallConfirmWidget(const QWidget *Anchor, const Friend& f);
explicit CallConfirmWidget(const QWidget* Anchor, const Friend& f);
signals:
void accepted();

View File

@ -21,7 +21,7 @@
#include "src/widget/translator.h"
#include <QKeyEvent>
ChatTextEdit::ChatTextEdit(QWidget *parent) :
ChatTextEdit::ChatTextEdit(QWidget* parent) :
QTextEdit(parent)
{
retranslateUi();

View File

@ -26,7 +26,7 @@ class ChatTextEdit final : public QTextEdit
{
Q_OBJECT
public:
explicit ChatTextEdit(QWidget *parent = 0);
explicit ChatTextEdit(QWidget* parent = 0);
~ChatTextEdit();
void setLastMessage(QString lm);
void sendKeyEvent(QKeyEvent * event);

View File

@ -26,7 +26,7 @@
#include <QBitmap>
#include <QTimer>
FlyoutOverlayWidget::FlyoutOverlayWidget(QWidget *parent)
FlyoutOverlayWidget::FlyoutOverlayWidget(QWidget* parent)
: QWidget(parent)
{
setContentsMargins(0, 0, 0, 0);

View File

@ -30,7 +30,7 @@ class FlyoutOverlayWidget : public QWidget
Q_OBJECT
Q_PROPERTY(qreal flyoutPercent READ flyoutPercent WRITE setFlyoutPercent)
public:
explicit FlyoutOverlayWidget(QWidget *parent = 0);
explicit FlyoutOverlayWidget(QWidget* parent = 0);
~FlyoutOverlayWidget();
int animationDuration() const;
@ -55,7 +55,7 @@ private:
void finishedAnimation();
void startAnimation(bool forward);
QWidget *container;
QWidget* container;
QPropertyAnimation *animation;
qreal percent = 1.0f;
QPoint startPos;

View File

@ -27,7 +27,7 @@
#include <QPlainTextEdit>
#include <QPushButton>
FriendRequestDialog::FriendRequestDialog(QWidget *parent, const QString &userId, const QString &message) :
FriendRequestDialog::FriendRequestDialog(QWidget* parent, const QString &userId, const QString &message) :
QDialog(parent)
{
setAttribute(Qt::WA_QuitOnClose, false);

View File

@ -26,7 +26,7 @@ class FriendRequestDialog : public QDialog
{
Q_OBJECT
public:
explicit FriendRequestDialog(QWidget *parent, const QString &userId, const QString &message);
explicit FriendRequestDialog(QWidget* parent, const QString &userId, const QString &message);
};
#endif // FRIENDREQUESTDIALOG_HPP

View File

@ -22,7 +22,7 @@
#include <QPainter>
#include <QLinearGradient>
MicFeedbackWidget::MicFeedbackWidget(QWidget *parent)
MicFeedbackWidget::MicFeedbackWidget(QWidget* parent)
: QWidget(parent), mMeterListener(nullptr)
{
setFixedHeight(20);

View File

@ -28,7 +28,7 @@ class MicFeedbackWidget : public QWidget
{
Q_OBJECT
public:
explicit MicFeedbackWidget(QWidget *parent = 0);
explicit MicFeedbackWidget(QWidget* parent = 0);
protected:
void paintEvent(QPaintEvent* event) override;

View File

@ -22,7 +22,7 @@
#include <QGraphicsOpacityEffect>
#include <cmath>
MovableWidget::MovableWidget(QWidget *parent)
MovableWidget::MovableWidget(QWidget* parent)
: QWidget(parent)
{
setMinimumHeight(64);

View File

@ -35,7 +35,7 @@
* to create dialog forms.
*/
ProfileImporter::ProfileImporter(QWidget *parent) : QWidget(parent)
ProfileImporter::ProfileImporter(QWidget* parent) : QWidget(parent)
{
}

View File

@ -27,7 +27,7 @@ class ProfileImporter : public QWidget
Q_OBJECT
public:
explicit ProfileImporter(QWidget *parent = 0);
explicit ProfileImporter(QWidget* parent = 0);
bool importProfile(const QString &path);
bool importProfile();

View File

@ -2,7 +2,7 @@
#include <QPushButton>
RemoveFriendDialog::RemoveFriendDialog(QWidget *parent, const Friend *f)
RemoveFriendDialog::RemoveFriendDialog(QWidget* parent, const Friend* f)
: QDialog(parent)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

View File

@ -11,7 +11,7 @@ class RemoveFriendDialog : public QDialog
{
Q_OBJECT
public:
explicit RemoveFriendDialog(QWidget *parent, const Friend* f);
explicit RemoveFriendDialog(QWidget* parent, const Friend* f);
inline bool removeHistory()
{

View File

@ -84,7 +84,7 @@ bool toxActivateEventHandler(const QByteArray&)
Widget *Widget::instance{nullptr};
Widget::Widget(QWidget *parent)
Widget::Widget(QWidget* parent)
: QMainWindow(parent),
icon{nullptr},
trayMenu{nullptr},
@ -1252,7 +1252,7 @@ void Widget::onReceiptRecieved(int friendId, int receipt)
f->getChatForm()->getOfflineMsgEngine()->dischargeReceipt(receipt);
}
void Widget::addFriendDialog(Friend *frnd, ContentDialog *dialog)
void Widget::addFriendDialog(Friend* frnd, ContentDialog *dialog)
{
ContentDialog *contentDialog = ContentDialog::getFriendDialog(frnd->getFriendId());
bool isSeparate = Settings::getInstance().getSeparateWindow();
@ -1510,7 +1510,7 @@ void Widget::onFriendRequestReceived(const ToxPk& friendPk, const QString& messa
}
}
void Widget::updateFriendActivity(Friend *frnd)
void Widget::updateFriendActivity(Friend* frnd)
{
const ToxPk &pk = frnd->getPublicKey();
QDate date = Settings::getInstance().getFriendActivity(pk);
@ -2209,7 +2209,7 @@ void Widget::processOfflineMsgs()
if (OfflineMsgEngine::globalMutex.tryLock())
{
QList<Friend*> frnds = FriendList::getAllFriends();
for (Friend *f : frnds)
for (Friend* f : frnds)
{
f->getChatForm()->getOfflineMsgEngine()->deliverOfflineMsgs();
}
@ -2221,7 +2221,7 @@ void Widget::processOfflineMsgs()
void Widget::clearAllReceipts()
{
QList<Friend*> frnds = FriendList::getAllFriends();
for (Friend *f : frnds)
for (Friend* f : frnds)
{
f->getChatForm()->getOfflineMsgEngine()->removeAllReceipts();
}

View File

@ -65,10 +65,10 @@ class Widget final : public QMainWindow
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = 0);
explicit Widget(QWidget* parent = 0);
~Widget();
void init();
void setCentralWidget(QWidget *widget, const QString &widgetName);
void setCentralWidget(QWidget* widget, const QString &widgetName);
QString getUsername();
Camera* getCamera();
static Widget* getInstance();