* Cosmetic change. Replace Qt keyword emit with Q_EMIT.

* Whitespace fixes.
This commit is contained in:
Mateusz Skowroński 2017-01-05 22:38:23 +01:00
parent 96dc57c068
commit 9b07616fe6
7 changed files with 407 additions and 407 deletions

View File

@ -195,7 +195,7 @@ void TaskHeader::leaveEvent ( QEvent * /*event*/ )
void TaskHeader::fold() void TaskHeader::fold()
{ {
if (myExpandable) { if (myExpandable) {
emit activated(); Q_EMIT activated();
// Toggling the 'm_fold' member here may lead to inconsistencies with its ActionGroup. // Toggling the 'm_fold' member here may lead to inconsistencies with its ActionGroup.
// Thus, the method setFold() was added and called from ActionGroup when required. // Thus, the method setFold() was added and called from ActionGroup when required.
#if 0 #if 0
@ -254,7 +254,7 @@ void TaskHeader::changeIcons()
void TaskHeader::mouseReleaseEvent ( QMouseEvent * event ) void TaskHeader::mouseReleaseEvent ( QMouseEvent * event )
{ {
if (event->button() == Qt::LeftButton) { if (event->button() == Qt::LeftButton) {
emit activated(); Q_EMIT activated();
} }
} }

View File

@ -70,7 +70,7 @@ SignalThread::run(void)
// just wait, and trigger every time we receive a signal // just wait, and trigger every time we receive a signal
this->waitcond.wait(&this->mutex); this->waitcond.wait(&this->mutex);
if (!this->isstopped) { if (!this->isstopped) {
emit triggerSignal(); Q_EMIT triggerSignal();
} }
} }
} }

View File

@ -162,10 +162,10 @@ void iisIconLabel::mousePressEvent ( QMouseEvent * event )
{ {
if (event->button() == Qt::LeftButton) { if (event->button() == Qt::LeftButton) {
m_pressed = true; m_pressed = true;
emit pressed(); Q_EMIT pressed();
} else } else
if (event->button() == Qt::RightButton) if (event->button() == Qt::RightButton)
emit contextMenu(); Q_EMIT contextMenu();
update(); update();
} }
@ -174,11 +174,11 @@ void iisIconLabel::mouseReleaseEvent ( QMouseEvent * event )
{ {
if (event->button() == Qt::LeftButton) { if (event->button() == Qt::LeftButton) {
m_pressed = false; m_pressed = false;
emit released(); Q_EMIT released();
if (rect().contains( event->pos() )) { if (rect().contains( event->pos() )) {
emit clicked(); Q_EMIT clicked();
emit activated(); Q_EMIT activated();
} }
} }
@ -190,7 +190,7 @@ void iisIconLabel::keyPressEvent ( QKeyEvent * event )
switch (event->key()) { switch (event->key()) {
case Qt::Key_Space: case Qt::Key_Space:
case Qt::Key_Return: case Qt::Key_Return:
emit activated(); Q_EMIT activated();
break; break;
default:; default:;

View File

@ -165,7 +165,7 @@ void iisTaskHeader::leaveEvent ( QEvent * /*event*/ )
void iisTaskHeader::fold() void iisTaskHeader::fold()
{ {
if (myExpandable) { if (myExpandable) {
emit activated(); Q_EMIT activated();
m_fold = !m_fold; m_fold = !m_fold;
changeIcons(); changeIcons();
@ -195,7 +195,7 @@ void iisTaskHeader::changeIcons()
void iisTaskHeader::mouseReleaseEvent ( QMouseEvent * event ) void iisTaskHeader::mouseReleaseEvent ( QMouseEvent * event )
{ {
if (event->button() == Qt::LeftButton) { if (event->button() == Qt::LeftButton) {
emit activated(); Q_EMIT activated();
} }
} }

View File

@ -434,7 +434,7 @@ void QtColorPicker::setStandardColors()
void QtColorPicker::setCurrentColor(const QColor &color) void QtColorPicker::setCurrentColor(const QColor &color)
{ {
if (color.isValid() && col == color) { if (color.isValid() && col == color) {
emit colorSet(color); Q_EMIT colorSet(color);
return; return;
} }
if (col == color || !color.isValid()) if (col == color || !color.isValid())
@ -457,8 +457,8 @@ void QtColorPicker::setCurrentColor(const QColor &color)
repaint(); repaint();
item->setSelected(true); item->setSelected(true);
emit colorChanged(color); Q_EMIT colorChanged(color);
emit colorSet(color); Q_EMIT colorSet(color);
} }
/*! /*!
@ -679,7 +679,7 @@ void ColorPickerPopup::updateSelected()
if (sender() && sender()->inherits("ColorPickerItem")) { if (sender() && sender()->inherits("ColorPickerItem")) {
ColorPickerItem *item = (ColorPickerItem *)sender(); ColorPickerItem *item = (ColorPickerItem *)sender();
lastSel = item->color(); lastSel = item->color();
emit selected(item->color()); Q_EMIT selected(item->color());
} }
hide(); hide();
@ -764,7 +764,7 @@ void ColorPickerPopup::keyPressEvent(QKeyEvent *e)
} }
lastSel = wi->color(); lastSel = wi->color();
emit selected(wi->color()); Q_EMIT selected(wi->color());
hide(); hide();
} else if (w && w->inherits("QPushButton")) { } else if (w && w->inherits("QPushButton")) {
ColorPickerItem *wi = reinterpret_cast<ColorPickerItem *>(w); ColorPickerItem *wi = reinterpret_cast<ColorPickerItem *>(w);
@ -784,7 +784,7 @@ void ColorPickerPopup::keyPressEvent(QKeyEvent *e)
} }
lastSel = wi->color(); lastSel = wi->color();
emit selected(wi->color()); Q_EMIT selected(wi->color());
hide(); hide();
} }
} }
@ -811,7 +811,7 @@ void ColorPickerPopup::hideEvent(QHideEvent *e)
setFocus(); setFocus();
emit hid(); Q_EMIT hid();
QFrame::hideEvent(e); QFrame::hideEvent(e);
} }
@ -906,7 +906,7 @@ void ColorPickerPopup::getColorFromDialog()
//QColor col = QColor::fromRgba(rgb); //QColor col = QColor::fromRgba(rgb);
insertColor(col, tr("Custom"), -1); insertColor(col, tr("Custom"), -1);
lastSel = col; lastSel = col;
emit selected(col); Q_EMIT selected(col);
} }
void ColorPickerPopup::setLastSel(const QColor & col) { lastSel = col; } void ColorPickerPopup::setLastSel(const QColor & col) { lastSel = col; }
@ -994,7 +994,7 @@ void ColorPickerItem::mouseMoveEvent(QMouseEvent *)
void ColorPickerItem::mouseReleaseEvent(QMouseEvent *) void ColorPickerItem::mouseReleaseEvent(QMouseEvent *)
{ {
sel = true; sel = true;
emit selected(); Q_EMIT selected();
} }
/*! /*!
@ -1062,7 +1062,7 @@ void ColorPickerButton::mouseReleaseEvent(QMouseEvent *)
{ {
setFrameShadow(Raised); setFrameShadow(Raised);
repaint(); repaint();
emit clicked(); Q_EMIT clicked();
} }
/*! /*!
@ -1096,7 +1096,7 @@ void ColorPickerButton::keyReleaseEvent(QKeyEvent *e)
} else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) { } else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) {
setFrameShadow(Raised); setFrameShadow(Raised);
repaint(); repaint();
emit clicked(); Q_EMIT clicked();
} else { } else {
QFrame::keyReleaseEvent(e); QFrame::keyReleaseEvent(e);
} }

View File

@ -182,7 +182,7 @@ void FileChooser::chooseFile()
if (!fn.isEmpty()) { if (!fn.isEmpty()) {
lineEdit->setText(fn); lineEdit->setText(fn);
emit fileNameSelected(fn); Q_EMIT fileNameSelected(fn);
} }
} }
@ -1032,7 +1032,7 @@ void ColorButton::onChooseColor()
if ( c.isValid() ) if ( c.isValid() )
{ {
setColor( c ); setColor( c );
emit changed(); Q_EMIT changed();
} }
} }

View File

@ -153,7 +153,7 @@ void Wizard::setCurrentIndex(int index)
textLabel->setText(stackWidget->currentWidget()->windowTitle()); textLabel->setText(stackWidget->currentWidget()->windowTitle());
_backButton->setEnabled(index > 0); _backButton->setEnabled(index > 0);
_nextButton->setEnabled(index < count()-1); _nextButton->setEnabled(index < count()-1);
emit currentIndexChanged(index); Q_EMIT currentIndexChanged(index);
} }
} }
@ -171,7 +171,7 @@ void Wizard::setPageTitle(QString const &newTitle)
{ {
stackWidget->currentWidget()->setWindowTitle(newTitle); stackWidget->currentWidget()->setWindowTitle(newTitle);
textLabel->setText(newTitle); textLabel->setText(newTitle);
emit pageTitleChanged(newTitle); Q_EMIT pageTitleChanged(newTitle);
} }
WizardExtension::WizardExtension(Wizard *widget, QObject *parent) WizardExtension::WizardExtension(Wizard *widget, QObject *parent)