Avoid warnings about an unreachable code
authorKonstantin Ritt <ritt.ks@gmail.com>
Mon, 8 Oct 2012 15:20:50 +0000 (18:20 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 10 Oct 2012 11:24:17 +0000 (13:24 +0200)
Change-Id: I57c2967db4c1bd2c39ecb3eac9b18eb7455c6a50
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/corelib/codecs/qtextcodec.cpp
src/corelib/global/qlibraryinfo.cpp
src/gui/painting/qtextureglyphcache.cpp
src/widgets/kernel/qapplication_qpa.cpp

index 203560d..d42d29d 100644 (file)
@@ -583,9 +583,9 @@ QTextCodec* QTextCodec::codecForMib(int mib)
 
 #ifdef QT_USE_ICU
     return QIcuCodec::codecForMibUnlocked(mib);
-#endif
-
+#else
     return 0;
+#endif
 }
 
 /*!
index 3f01425..ccf0718 100644 (file)
@@ -250,8 +250,9 @@ QLibraryInfo::isDebugBuild()
 {
 #ifdef QT_DEBUG
     return true;
-#endif
+#else
     return false;
+#endif
 }
 
 #endif // QT_BOOTSTRAPPED
index ed0e92e..43243b7 100644 (file)
@@ -275,10 +275,7 @@ QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g, QFixed subPixelPosition
 {
     if (m_type == QFontEngineGlyphCache::Raster_RGBMask)
         return m_current_fontengine->alphaRGBMapForGlyph(g, subPixelPosition, m_transform);
-    else
-        return m_current_fontengine->alphaMapForGlyph(g, subPixelPosition, m_transform);
-
-    return QImage();
+    return m_current_fontengine->alphaMapForGlyph(g, subPixelPosition, m_transform);
 }
 
 /************************************************************************
index 62e4904..6b04c18 100644 (file)
@@ -387,7 +387,6 @@ bool QApplication::isEffectEnabled(Qt::UIEffect effect)
     return QColormap::instance().depth() >= 16
            && (QApplicationPrivate::enabledAnimations & QPlatformTheme::GeneralUiEffect)
            && (QApplicationPrivate::enabledAnimations & uiEffectToFlag(effect));
-        return false;
 }
 
 QWidget *QApplication::topLevelAt(const QPoint &pos)