summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-14 12:35:44 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-14 12:35:44 (GMT)
commit05145be7e502d4330ced88d3e55207a99c0a841b (patch)
tree41a76a506b286cc1c0a6bbf317c89879be7a5079 /src/gui/kernel
parentb770651f19741907cd415ea9ad6e087cb32cc948 (diff)
downloadQt-05145be7e502d4330ced88d3e55207a99c0a841b.zip
Qt-05145be7e502d4330ced88d3e55207a99c0a841b.tar.gz
Qt-05145be7e502d4330ced88d3e55207a99c0a841b.tar.bz2
Fixed coverity warnings
Some dead code removed Some member not initialized missing
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget.cpp5
-rw-r--r--src/gui/kernel/qx11info_x11.cpp3
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index cc41f73..c00f953 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -2747,7 +2747,7 @@ void QWidget::showNormal()
bool QWidget::isEnabledTo(QWidget* ancestor) const
{
const QWidget * w = this;
- while (w && !w->testAttribute(Qt::WA_ForceDisabled)
+ while (!w->testAttribute(Qt::WA_ForceDisabled)
&& !w->isWindow()
&& w->parentWidget()
&& w->parentWidget() != ancestor)
@@ -7239,8 +7239,7 @@ bool QWidget::isVisibleTo(QWidget* ancestor) const
if (!ancestor)
return isVisible();
const QWidget * w = this;
- while (w
- && !w->isHidden()
+ while (!w->isHidden()
&& !w->isWindow()
&& w->parentWidget()
&& w->parentWidget() != ancestor)
diff --git a/src/gui/kernel/qx11info_x11.cpp b/src/gui/kernel/qx11info_x11.cpp
index 786d48d..136f7f8 100644
--- a/src/gui/kernel/qx11info_x11.cpp
+++ b/src/gui/kernel/qx11info_x11.cpp
@@ -179,6 +179,7 @@ QX11InfoData* QX11Info::getX11Data(bool def) const
QX11InfoData* res = 0;
if (def) {
res = new QX11InfoData;
+ res->ref = 0;
res->screen = appScreen();
res->depth = appDepth();
res->cells = appCells();
@@ -189,8 +190,8 @@ QX11InfoData* QX11Info::getX11Data(bool def) const
} else if (x11data) {
res = new QX11InfoData;
*res = *x11data;
+ res->ref = 0;
}
- res->ref = 0;
return res;
}