forked from qt-creator/qt-creator
Don't use return keyword when not necessary
Change-Id: I4b9fad1eee60e942ddbccda53a4af27e978df498 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Laurent Montel
parent
660c4ced86
commit
f18ae4ff6f
@@ -361,7 +361,7 @@ QReadWriteLock *PluginManager::listLock()
|
||||
*/
|
||||
void PluginManager::loadPlugins()
|
||||
{
|
||||
return d->loadPlugins();
|
||||
d->loadPlugins();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -703,8 +703,10 @@ static inline bool rangeCheck(int target, int pos)
|
||||
|
||||
void PreviewLabel::mousePressEvent(QMouseEvent * event)
|
||||
{
|
||||
if (!m_borderImage)
|
||||
return QLabel::mouseMoveEvent(event);
|
||||
if (!m_borderImage) {
|
||||
QLabel::mouseMoveEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
bool bottom = false;
|
||||
|
||||
@@ -790,8 +792,10 @@ static inline int limitPositive(int i)
|
||||
|
||||
void PreviewLabel::mouseMoveEvent(QMouseEvent * event)
|
||||
{
|
||||
if (!m_borderImage)
|
||||
return QLabel::mouseMoveEvent(event);
|
||||
if (!m_borderImage) {
|
||||
QLabel::mouseMoveEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
QPoint p = event->pos();
|
||||
bool bottom = false;
|
||||
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
static void accept(Node *node, Visitor *visitor);
|
||||
|
||||
inline static void acceptChild(Node *node, Visitor *visitor)
|
||||
{ return accept(node, visitor); } // ### remove
|
||||
{ accept(node, visitor); } // ### remove
|
||||
|
||||
virtual void accept0(Visitor *visitor) = 0;
|
||||
virtual SourceLocation firstSourceLocation() const = 0;
|
||||
|
||||
@@ -62,7 +62,7 @@ void CompletingLineEdit::keyPressEvent(QKeyEvent *e)
|
||||
comp->complete();
|
||||
}
|
||||
}
|
||||
return QLineEdit::keyPressEvent(e);
|
||||
QLineEdit::keyPressEvent(e);
|
||||
}
|
||||
|
||||
} // namespace Utils
|
||||
|
||||
@@ -407,7 +407,7 @@ QString ConsoleProcess::terminalEmulator(const QSettings *settings, bool nonEmpt
|
||||
|
||||
void ConsoleProcess::setTerminalEmulator(QSettings *settings, const QString &term)
|
||||
{
|
||||
return settings->setValue(QLatin1String("General/TerminalEmulator"), term);
|
||||
settings->setValue(QLatin1String("General/TerminalEmulator"), term);
|
||||
}
|
||||
|
||||
bool ConsoleProcess::startTerminalEmulator(QSettings *settings, const QString &workingDir)
|
||||
|
||||
@@ -47,7 +47,7 @@ QString UnixUtils::fileBrowser(const QSettings *settings)
|
||||
|
||||
void UnixUtils::setFileBrowser(QSettings *settings, const QString &term)
|
||||
{
|
||||
return settings->setValue(QLatin1String("General/FileBrowser"), term);
|
||||
settings->setValue(QLatin1String("General/FileBrowser"), term);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -231,12 +231,12 @@ QPalette ManhattanStyle::standardPalette() const
|
||||
|
||||
void ManhattanStyle::polish(QApplication *app)
|
||||
{
|
||||
return QProxyStyle::polish(app);
|
||||
QProxyStyle::polish(app);
|
||||
}
|
||||
|
||||
void ManhattanStyle::unpolish(QApplication *app)
|
||||
{
|
||||
return QProxyStyle::unpolish(app);
|
||||
QProxyStyle::unpolish(app);
|
||||
}
|
||||
|
||||
QPalette panelPalette(const QPalette &oldPalette, bool lightColored = false)
|
||||
@@ -381,8 +381,10 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const
|
||||
void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget) const
|
||||
{
|
||||
if (!panelWidget(widget))
|
||||
return QProxyStyle::drawPrimitive(element, option, painter, widget);
|
||||
if (!panelWidget(widget)) {
|
||||
QProxyStyle::drawPrimitive(element, option, painter, widget);
|
||||
return;
|
||||
}
|
||||
|
||||
bool animating = (option->state & State_Animating);
|
||||
int state = option->state;
|
||||
@@ -614,8 +616,10 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
||||
void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *option,
|
||||
QPainter *painter, const QWidget *widget) const
|
||||
{
|
||||
if (!panelWidget(widget) && !qobject_cast<const QMenu *>(widget))
|
||||
return QProxyStyle::drawControl(element, option, painter, widget);
|
||||
if (!panelWidget(widget) && !qobject_cast<const QMenu *>(widget)) {
|
||||
QProxyStyle::drawControl(element, option, painter, widget);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (element) {
|
||||
case CE_MenuItem:
|
||||
|
||||
@@ -157,5 +157,5 @@ void NonResizingSplitter::resizeEvent(QResizeEvent *ev)
|
||||
int leftSplitWidth = qMin(sizes().at(0), ev->size().width());
|
||||
int rightSplitWidth = qMax(0, ev->size().width() - leftSplitWidth);
|
||||
setSizes(QList<int>() << leftSplitWidth << rightSplitWidth);
|
||||
return QWidget::resizeEvent(ev);
|
||||
QWidget::resizeEvent(ev);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ bool ProcessStep::init(QList<const BuildStep *> &earlierSteps)
|
||||
|
||||
void ProcessStep::run(QFutureInterface<bool> & fi)
|
||||
{
|
||||
return AbstractProcessStep::run(fi);
|
||||
AbstractProcessStep::run(fi);
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *ProcessStep::createConfigWidget()
|
||||
|
||||
@@ -527,7 +527,7 @@ void TextDocumentLayout::setFolded(const QTextBlock &block, bool folded)
|
||||
if (folded)
|
||||
userData(block)->setFolded(true);
|
||||
else if (TextBlockUserData *userData = testUserData(block))
|
||||
return userData->setFolded(false);
|
||||
userData->setFolded(false);
|
||||
}
|
||||
|
||||
void TextDocumentLayout::requestExtraAreaUpdate()
|
||||
|
||||
Reference in New Issue
Block a user