summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-20 10:22:15 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-20 12:36:50 +0200
commit5fa19cbf945f43146f2b0e0f93da53fec27fd543 (patch)
tree9906406fc967f9510d647415ab7d4dbd24b67e1e /src/gui
parentc7c7b364d9816d03c7475d6592d50dec5401c151 (diff)
Remove a few warnings when compiling Qt and unexport some functions.
Make some functions static that are not used anywhere but in the current file. Others that are used, add the declaration to the _p.h to ensure we don't forget about them. Finally, there's no need to enable debugging code if it's not used anywhere. Reviewed-by: TrustMe
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qbmphandler.cpp8
-rw-r--r--src/gui/image/qiconloader_p.h1
-rw-r--r--src/gui/kernel/qshortcutmap.cpp4
-rw-r--r--src/gui/styles/gtksymbols.cpp2
4 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index ccf8457db1..19701b41e7 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -81,14 +81,14 @@ static void swapPixel01(QImage *image) // 1-bpp: swap 0 and 1 pixels
const int BMP_FILEHDR_SIZE = 14; // size of BMP_FILEHDR data
-QDataStream &operator>>(QDataStream &s, BMP_FILEHDR &bf)
+static QDataStream &operator>>(QDataStream &s, BMP_FILEHDR &bf)
{ // read file header
s.readRawData(bf.bfType, 2);
s >> bf.bfSize >> bf.bfReserved1 >> bf.bfReserved2 >> bf.bfOffBits;
return s;
}
-QDataStream &operator<<(QDataStream &s, const BMP_FILEHDR &bf)
+static QDataStream &operator<<(QDataStream &s, const BMP_FILEHDR &bf)
{ // write file header
s.writeRawData(bf.bfType, 2);
s << bf.bfSize << bf.bfReserved1 << bf.bfReserved2 << bf.bfOffBits;
@@ -106,7 +106,7 @@ const int BMP_RLE4 = 2; // run-length encoded, 4
const int BMP_BITFIELDS = 3; // RGB values encoded in data as bit-fields
-QDataStream &operator>>(QDataStream &s, BMP_INFOHDR &bi)
+static QDataStream &operator>>(QDataStream &s, BMP_INFOHDR &bi)
{
s >> bi.biSize;
if (bi.biSize == BMP_WIN || bi.biSize == BMP_OS2) {
@@ -128,7 +128,7 @@ QDataStream &operator>>(QDataStream &s, BMP_INFOHDR &bi)
return s;
}
-QDataStream &operator<<(QDataStream &s, const BMP_INFOHDR &bi)
+static QDataStream &operator<<(QDataStream &s, const BMP_INFOHDR &bi)
{
s << bi.biSize;
s << bi.biWidth << bi.biHeight;
diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h
index b2944ef284..5d5c211312 100644
--- a/src/gui/image/qiconloader_p.h
+++ b/src/gui/image/qiconloader_p.h
@@ -85,6 +85,7 @@ struct QIconDirInfo
class QIconLoaderEngineEntry
{
public:
+ virtual ~QIconLoaderEngineEntry() {}
virtual QPixmap pixmap(const QSize &size,
QIcon::Mode mode,
QIcon::State state) = 0;
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index c965bac5a9..0027deb60e 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -99,11 +99,11 @@ struct QShortcutEntry
QObject *owner;
};
-#ifndef QT_NO_DEBUG_STREAM
+#if 0 //ndef QT_NO_DEBUG_STREAM
/*! \internal
QDebug operator<< for easy debug output of the shortcut entries.
*/
-QDebug &operator<<(QDebug &dbg, const QShortcutEntry *se) {
+static QDebug &operator<<(QDebug &dbg, const QShortcutEntry *se) {
if (!se)
return dbg << "QShortcutEntry(0x0)";
dbg.nospace()
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp
index 51f40e3a5e..6a5ea49ea8 100644
--- a/src/gui/styles/gtksymbols.cpp
+++ b/src/gui/styles/gtksymbols.cpp
@@ -642,7 +642,7 @@ GtkStyle* QGtk::gtkStyle(const QString &path)
return 0;
}
-static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *pspec, gpointer user_data)
+static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *, gpointer)
{
GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS;
g_object_get(gtkToolBar, "toolbar-style", &toolbar_style, NULL);