Skip to content

Commit 1385357

Browse files
BronzdragonWalter Bormans
andauthored
Additional Qt keyword conversion. (#299)
This comit is an addtion to pull request #295. Not all Qt keywords were included. Co-authored-by: Walter Bormans <walter.bormans@paradoxcat.com>
1 parent b6b4c62 commit 1385357

17 files changed

+66
-66
lines changed

src/DockAreaTabBar.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ void CDockAreaTabBar::setCurrentIndex(int index)
180180
return;
181181
}
182182

183-
emit currentChanging(index);
183+
Q_EMIT currentChanging(index);
184184
d->CurrentIndex = index;
185185
d->updateTabs();
186186
updateGeometry();
187-
emit currentChanged(index);
187+
Q_EMIT currentChanged(index);
188188
}
189189

190190

@@ -206,7 +206,7 @@ void CDockAreaTabBar::insertTab(int Index, CDockWidgetTab* Tab)
206206
connect(Tab, SIGNAL(moved(const QPoint&)), this, SLOT(onTabWidgetMoved(const QPoint&)));
207207
connect(Tab, SIGNAL(elidedChanged(bool)), this, SIGNAL(elidedChanged(bool)));
208208
Tab->installEventFilter(this);
209-
emit tabInserted(Index);
209+
Q_EMIT tabInserted(Index);
210210
if (Index <= d->CurrentIndex)
211211
{
212212
setCurrentIndex(d->CurrentIndex + 1);
@@ -266,7 +266,7 @@ void CDockAreaTabBar::removeTab(CDockWidgetTab* Tab)
266266
}
267267
}
268268

269-
emit removingTab(RemoveIndex);
269+
Q_EMIT removingTab(RemoveIndex);
270270
d->TabsLayout->removeWidget(Tab);
271271
Tab->disconnect(this);
272272
Tab->removeEventFilter(this);
@@ -320,7 +320,7 @@ void CDockAreaTabBar::onTabClicked()
320320
return;
321321
}
322322
setCurrentIndex(index);
323-
emit tabBarClicked(index);
323+
Q_EMIT tabBarClicked(index);
324324
}
325325

326326

@@ -409,7 +409,7 @@ void CDockAreaTabBar::onTabWidgetMoved(const QPoint& GlobalPos)
409409
d->TabsLayout->removeWidget(MovingTab);
410410
d->TabsLayout->insertWidget(toIndex, MovingTab);
411411
ADS_PRINT("tabMoved from " << fromIndex << " to " << toIndex);
412-
emit tabMoved(fromIndex, toIndex);
412+
Q_EMIT tabMoved(fromIndex, toIndex);
413413
setCurrentIndex(toIndex);
414414
}
415415
else
@@ -432,7 +432,7 @@ void CDockAreaTabBar::closeTab(int Index)
432432
{
433433
return;
434434
}
435-
emit tabCloseRequested(Index);
435+
Q_EMIT tabCloseRequested(Index);
436436
}
437437

438438

@@ -449,12 +449,12 @@ bool CDockAreaTabBar::eventFilter(QObject *watched, QEvent *event)
449449
switch (event->type())
450450
{
451451
case QEvent::Hide:
452-
emit tabClosed(d->TabsLayout->indexOf(Tab));
452+
Q_EMIT tabClosed(d->TabsLayout->indexOf(Tab));
453453
updateGeometry();
454454
break;
455455

456456
case QEvent::Show:
457-
emit tabOpened(d->TabsLayout->indexOf(Tab));
457+
Q_EMIT tabOpened(d->TabsLayout->indexOf(Tab));
458458
updateGeometry();
459459
break;
460460

src/DockAreaTabBar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ADS_EXPORT CDockAreaTabBar : public QScrollArea
5858
friend struct DockAreaTabBarPrivate;
5959
friend class CDockAreaTitleBar;
6060

61-
private slots:
61+
private Q_SLOTS:
6262
void onTabClicked();
6363
void onTabCloseRequested();
6464
void onCloseOtherTabsRequested();
@@ -140,7 +140,7 @@ private slots:
140140
*/
141141
virtual QSize sizeHint() const override;
142142

143-
public slots:
143+
public Q_SLOTS:
144144
/**
145145
* This property sets the index of the tab bar's visible tab
146146
*/
@@ -152,7 +152,7 @@ public slots:
152152
*/
153153
void closeTab(int Index);
154154

155-
signals:
155+
Q_SIGNALS:
156156
/**
157157
* This signal is emitted when the tab bar's current tab is about to be changed. The new
158158
* current has the given index, or -1 if there isn't a new one.

src/DockAreaTitleBar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ void CDockAreaTitleBar::onTabsMenuActionTriggered(QAction* Action)
382382
{
383383
int Index = Action->data().toInt();
384384
d->TabBar->setCurrentIndex(Index);
385-
emit tabBarClicked(Index);
385+
Q_EMIT tabBarClicked(Index);
386386
}
387387

388388

src/DockAreaTitleBar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ADS_EXPORT CDockAreaTitleBar : public QFrame
5454
DockAreaTitleBarPrivate* d; ///< private data (pimpl)
5555
friend struct DockAreaTitleBarPrivate;
5656

57-
private slots:
57+
private Q_SLOTS:
5858
void onTabsMenuAboutToShow();
5959
void onCloseButtonClicked();
6060
void onUndockButtonClicked();
@@ -88,7 +88,7 @@ private slots:
8888
*/
8989
virtual void contextMenuEvent(QContextMenuEvent *event) override;
9090

91-
public slots:
91+
public Q_SLOTS:
9292
/**
9393
* Call this slot to tell the title bar that it should update the tabs menu
9494
* the next time it is shown.
@@ -148,7 +148,7 @@ public slots:
148148
*/
149149
int indexOf(QWidget *widget) const;
150150

151-
signals:
151+
Q_SIGNALS:
152152
/**
153153
* This signal is emitted if a tab in the tab bar is clicked by the user
154154
* or if the user clicks on a tab item in the title bar tab menu.

src/DockAreaWidget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ CDockAreaWidget::CDockAreaWidget(CDockManager* DockManager, CDockContainerWidget
378378
d->ContentsLayout = new DockAreaLayout(d->Layout);
379379
if (d->DockManager)
380380
{
381-
emit d->DockManager->dockAreaCreated(this);
381+
Q_EMIT d->DockManager->dockAreaCreated(this);
382382
}
383383
}
384384

@@ -604,11 +604,11 @@ void CDockAreaWidget::setCurrentIndex(int index)
604604
return;
605605
}
606606

607-
emit currentChanging(index);
607+
Q_EMIT currentChanging(index);
608608
TabBar->setCurrentIndex(index);
609609
d->ContentsLayout->setCurrentIndex(index);
610610
d->ContentsLayout->currentWidget()->show();
611-
emit currentChanged(index);
611+
Q_EMIT currentChanged(index);
612612
}
613613

614614

@@ -888,7 +888,7 @@ void CDockAreaWidget::toggleView(bool Open)
888888
{
889889
setVisible(Open);
890890

891-
emit viewToggled(Open);
891+
Q_EMIT viewToggled(Open);
892892
}
893893

894894

src/DockAreaWidget.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class ADS_EXPORT CDockAreaWidget : public QFrame
6767
friend class CDockManager;
6868
void onDockWidgetFeaturesChanged();
6969

70-
private slots:
70+
private Q_SLOTS:
7171
void onTabCloseRequested(int Index);
7272

7373
/**
@@ -138,7 +138,7 @@ private slots:
138138
*/
139139
void markTitleBarMenuOutdated();
140140

141-
protected slots:
141+
protected Q_SLOTS:
142142
void toggleView(bool Open);
143143

144144
public:
@@ -312,7 +312,7 @@ protected slots:
312312
*/
313313
bool isCentralWidgetArea() const;
314314

315-
public slots:
315+
public Q_SLOTS:
316316
/**
317317
* This activates the tab for the given tab index.
318318
* If the dock widget for the given tab is not visible, the this function
@@ -330,7 +330,7 @@ public slots:
330330
*/
331331
void closeOtherAreas();
332332

333-
signals:
333+
Q_SIGNALS:
334334
/**
335335
* This signal is emitted when user clicks on a tab at an index.
336336
*/

src/DockContainerWidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,13 @@ class DockContainerWidgetPrivate
284284
void emitDockAreasRemoved()
285285
{
286286
onVisibleDockAreaCountChanged();
287-
emit _this->dockAreasRemoved();
287+
Q_EMIT _this->dockAreasRemoved();
288288
}
289289

290290
void emitDockAreasAdded()
291291
{
292292
onVisibleDockAreaCountChanged();
293-
emit _this->dockAreasAdded();
293+
Q_EMIT _this->dockAreasAdded();
294294
}
295295

296296
/**
@@ -341,7 +341,7 @@ class DockContainerWidgetPrivate
341341
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(_this->sender());
342342
VisibleDockAreaCount += Visible ? 1 : -1;
343343
onVisibleDockAreaCountChanged();
344-
emit _this->dockAreaViewToggled(DockArea, Visible);
344+
Q_EMIT _this->dockAreaViewToggled(DockArea, Visible);
345345
}
346346
}; // struct DockContainerWidgetPrivate
347347

src/DockFocusController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
174174
ForceFocusChangedSignal = false;
175175
if (DockWidget->isVisible())
176176
{
177-
emit DockManager->focusedDockWidgetChanged(old, DockWidget);
177+
Q_EMIT DockManager->focusedDockWidgetChanged(old, DockWidget);
178178
}
179179
else
180180
{
@@ -193,7 +193,7 @@ void CDockFocusController::onDockWidgetVisibilityChanged(bool Visible)
193193
disconnect(Sender, SIGNAL(visibilityChanged(bool)), this, SLOT(onDockWidgetVisibilityChanged(bool)));
194194
if (DockWidget && Visible)
195195
{
196-
emit d->DockManager->focusedDockWidgetChanged(d->OldFocusedDockWidget, DockWidget);
196+
Q_EMIT d->DockManager->focusedDockWidgetChanged(d->OldFocusedDockWidget, DockWidget);
197197
}
198198
}
199199

src/DockFocusController.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ADS_EXPORT CDockFocusController : public QObject
3030
DockFocusControllerPrivate* d; ///< private data (pimpl)
3131
friend struct DockFocusControllerPrivate;
3232

33-
private slots:
33+
private Q_SLOTS:
3434
void onApplicationFocusChanged(QWidget *old, QWidget *now);
3535
void onFocusedDockAreaViewToggled(bool Open);
3636
void onStateRestored();
@@ -83,7 +83,7 @@ private slots:
8383
*/
8484
CDockWidget* focusedDockWidget() const;
8585

86-
public slots:
86+
public Q_SLOTS:
8787
/**
8888
* Request a focus change to the given dock widget
8989
*/

src/DockManager.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ void DockManagerPrivate::restoreDockWidgetsOpenState()
343343
if (DockWidget->property(internal::DirtyProperty).toBool())
344344
{
345345
DockWidget->flagAsUnassigned();
346-
emit DockWidget->viewToggled(false);
346+
Q_EMIT DockWidget->viewToggled(false);
347347
}
348348
else
349349
{
@@ -582,7 +582,7 @@ bool CDockManager::eventFilter(QObject *obj, QEvent *e)
582582
void CDockManager::registerFloatingWidget(CFloatingDockContainer* FloatingWidget)
583583
{
584584
d->FloatingWidgets.append(FloatingWidget);
585-
emit floatingWidgetCreated(FloatingWidget);
585+
Q_EMIT floatingWidgetCreated(FloatingWidget);
586586
ADS_PRINT("d->FloatingWidgets.count() " << d->FloatingWidgets.count());
587587
}
588588

@@ -699,14 +699,14 @@ bool CDockManager::restoreState(const QByteArray &state, int version)
699699
hide();
700700
}
701701
d->RestoringState = true;
702-
emit restoringState();
702+
Q_EMIT restoringState();
703703
bool Result = d->restoreState(state, version);
704704
d->RestoringState = false;
705705
if (!IsHidden)
706706
{
707707
show();
708708
}
709-
emit stateRestored();
709+
Q_EMIT stateRestored();
710710
return Result;
711711
}
712712

@@ -732,7 +732,7 @@ CFloatingDockContainer* CDockManager::addDockWidgetFloating(CDockWidget* Dockwid
732732
{
733733
d->UninitializedFloatingWidgets.append(FloatingWidget);
734734
}
735-
emit dockWidgetAdded(Dockwidget);
735+
Q_EMIT dockWidgetAdded(Dockwidget);
736736
return FloatingWidget;
737737
}
738738

@@ -761,7 +761,7 @@ CDockAreaWidget* CDockManager::addDockWidget(DockWidgetArea area,
761761
d->DockWidgetsMap.insert(Dockwidget->objectName(), Dockwidget);
762762
auto Container = DockAreaWidget ? DockAreaWidget->dockContainer(): this;
763763
auto AreaOfAddedDockWidget = Container->addDockWidget(area, Dockwidget, DockAreaWidget);
764-
emit dockWidgetAdded(Dockwidget);
764+
Q_EMIT dockWidgetAdded(Dockwidget);
765765
return AreaOfAddedDockWidget;
766766
}
767767

@@ -803,11 +803,11 @@ CDockWidget* CDockManager::findDockWidget(const QString& ObjectName) const
803803
//============================================================================
804804
void CDockManager::removeDockWidget(CDockWidget* Dockwidget)
805805
{
806-
emit dockWidgetAboutToBeRemoved(Dockwidget);
806+
Q_EMIT dockWidgetAboutToBeRemoved(Dockwidget);
807807
d->DockWidgetsMap.remove(Dockwidget->objectName());
808808
CDockContainerWidget::removeDockWidget(Dockwidget);
809809
Dockwidget->setDockManager(nullptr);
810-
emit dockWidgetRemoved(Dockwidget);
810+
Q_EMIT dockWidgetRemoved(Dockwidget);
811811
}
812812

813813
//============================================================================
@@ -821,7 +821,7 @@ QMap<QString, CDockWidget*> CDockManager::dockWidgetsMap() const
821821
void CDockManager::addPerspective(const QString& UniquePrespectiveName)
822822
{
823823
d->Perspectives.insert(UniquePrespectiveName, saveState());
824-
emit perspectiveListChanged();
824+
Q_EMIT perspectiveListChanged();
825825
}
826826

827827

@@ -843,8 +843,8 @@ void CDockManager::removePerspectives(const QStringList& Names)
843843

844844
if (Count)
845845
{
846-
emit perspectivesRemoved();
847-
emit perspectiveListChanged();
846+
Q_EMIT perspectivesRemoved();
847+
Q_EMIT perspectiveListChanged();
848848
}
849849
}
850850

@@ -865,9 +865,9 @@ void CDockManager::openPerspective(const QString& PerspectiveName)
865865
return;
866866
}
867867

868-
emit openingPerspective(PerspectiveName);
868+
Q_EMIT openingPerspective(PerspectiveName);
869869
restoreState(Iterator.value());
870-
emit perspectiveOpened(PerspectiveName);
870+
Q_EMIT perspectiveOpened(PerspectiveName);
871871
}
872872

873873

0 commit comments

Comments
 (0)