diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/opentype/ftglue.c | 3 | ||||
-rw-r--r-- | src/codecs/qjpunicode.h | 3 | ||||
-rw-r--r-- | src/iconview/qiconview.cpp | 5 | ||||
-rw-r--r-- | src/kernel/qapplication_x11.cpp | 4 | ||||
-rw-r--r-- | src/kernel/qdragobject.cpp | 6 | ||||
-rw-r--r-- | src/kernel/qeventloop_unix_glib.cpp | 4 | ||||
-rw-r--r-- | src/kernel/qimage.cpp | 1 | ||||
-rw-r--r-- | src/kernel/qinputcontext.cpp | 9 | ||||
-rw-r--r-- | src/kernel/qinputcontext_x11.cpp | 2 | ||||
-rw-r--r-- | src/kernel/qjpegio.cpp | 2 | ||||
-rw-r--r-- | src/kernel/qnetworkprotocol.cpp | 8 | ||||
-rw-r--r-- | src/kernel/qnetworkprotocol.h | 4 | ||||
-rw-r--r-- | src/kernel/qprocess_unix.cpp | 8 | ||||
-rw-r--r-- | src/kernel/qscriptengine_x11.cpp | 12 | ||||
-rw-r--r-- | src/kernel/qstyle.h | 13 | ||||
-rw-r--r-- | src/network/qdns.cpp | 12 | ||||
-rw-r--r-- | src/sql/qsqldatabase.cpp | 6 | ||||
-rw-r--r-- | src/sql/qsqldatabase.h | 3 | ||||
-rw-r--r-- | src/styles/qcommonstyle.cpp | 12 | ||||
-rw-r--r-- | src/widgets/qlistview.cpp | 5 | ||||
-rw-r--r-- | src/widgets/qpopupmenu.cpp | 1 | ||||
-rw-r--r-- | src/widgets/qtooltip.cpp | 4 | ||||
-rw-r--r-- | src/widgets/qtooltip.h | 1 |
23 files changed, 101 insertions, 27 deletions
diff --git a/src/3rdparty/opentype/ftglue.c b/src/3rdparty/opentype/ftglue.c index bf895ec..bb7dfa6 100644 --- a/src/3rdparty/opentype/ftglue.c +++ b/src/3rdparty/opentype/ftglue.c @@ -290,7 +290,6 @@ ftglue_face_goto_table( FT_Face face, if ( face->num_faces > 1 ) { /* deal with TrueType collections */ - FT_ULong offset; LOG(( ">> This is a TrueType Collection\n" )); @@ -298,8 +297,6 @@ ftglue_face_goto_table( FT_Face face, ACCESS_Frame( 4 ) ) goto Exit; - offset = GET_ULong(); - FORGET_Frame(); } diff --git a/src/codecs/qjpunicode.h b/src/codecs/qjpunicode.h index 2b580c3..10e9e73 100644 --- a/src/codecs/qjpunicode.h +++ b/src/codecs/qjpunicode.h @@ -84,6 +84,9 @@ class Q_EXPORT_CODECS_JP QJpUnicodeConv { public: + virtual ~QJpUnicodeConv() {} + +public: enum Rules { // "ASCII" is ANSI X.3.4-1986, a.k.a. US-ASCII here. Default = 0x0000, diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp index 636fc61..66fa498 100644 --- a/src/iconview/qiconview.cpp +++ b/src/iconview/qiconview.cpp @@ -381,6 +381,7 @@ class QIconViewToolTip : public QToolTip { public: QIconViewToolTip( QWidget *parent, QIconView *iv ); + virtual ~QIconViewToolTip(); void maybeTip( const QPoint &pos ); @@ -393,6 +394,10 @@ QIconViewToolTip::QIconViewToolTip( QWidget *parent, QIconView *iv ) { } +QIconViewToolTip::~QIconViewToolTip() +{ +} + void QIconViewToolTip::maybeTip( const QPoint &pos ) { if ( !parentWidget() || !view || view->wordWrapIconText() || !view->showToolTips() ) diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp index 2873b9e..c2c0288 100644 --- a/src/kernel/qapplication_x11.cpp +++ b/src/kernel/qapplication_x11.cpp @@ -430,7 +430,7 @@ static bool qt_x11EventFilter( XEvent* ev ) //XIM qt_xim = 0; Q_EXPORT XIMStyle qt_xim_style = 0; Q_EXPORT XIMStyle qt_xim_preferred_style = 0; -Q_EXPORT static XIMStyle xim_default_style = XIMPreeditCallbacks | XIMStatusNothing; +static XIMStyle xim_default_style = XIMPreeditCallbacks | XIMStatusNothing; #endif Q_EXPORT int qt_ximComposingKeycode=0; @@ -5889,7 +5889,7 @@ static Bool qt_net_wm_sync_request_scanner(Display*, XEvent* event, XPointer arg { return (event->type == ClientMessage && event->xclient.window == *(Window*)arg && event->xclient.message_type == qt_wm_protocols - && event->xclient.data.l[ 0 ] == qt_net_wm_sync_request ); + && ((unsigned int)event->xclient.data.l[ 0 ]) == qt_net_wm_sync_request ); } #endif diff --git a/src/kernel/qdragobject.cpp b/src/kernel/qdragobject.cpp index 4f3353b..d48d79f 100644 --- a/src/kernel/qdragobject.cpp +++ b/src/kernel/qdragobject.cpp @@ -1749,9 +1749,9 @@ QColorDrag::QColorDrag( QWidget *dragsource, const char *name ) void QColorDrag::setColor( const QColor &col ) { - short r = (col.red() << 8) | col.red(); - short g = (col.green() << 8) | col.green(); - short b = (col.blue() << 8) | col.blue(); + unsigned short r = (col.red() << 8) | col.red(); + unsigned short g = (col.green() << 8) | col.green(); + unsigned short b = (col.blue() << 8) | col.blue(); // make sure we transmit data in network order r = htons(r); diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp index 6852f6b..e607447 100644 --- a/src/kernel/qeventloop_unix_glib.cpp +++ b/src/kernel/qeventloop_unix_glib.cpp @@ -505,7 +505,9 @@ void QEventLoop::wakeUp() size_t nbytes = 0; char c = 0; if ( ::ioctl( d->thread_pipe[0], FIONREAD, (char*)&nbytes ) >= 0 && nbytes == 0 ) { - ::write( d->thread_pipe[1], &c, 1 ); + if (::write( d->thread_pipe[1], &c, 1 ) < 0) { + // Failed! + } } } diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index b55a0e7..214fc85 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -5424,6 +5424,7 @@ static void write_pbm_image( QImageIO *iio ) class QImageIOFrameGrabber : public QImageConsumer { public: QImageIOFrameGrabber() : framecount(0) { } + virtual ~QImageIOFrameGrabber() { } QImageDecoder *decoder; int framecount; diff --git a/src/kernel/qinputcontext.cpp b/src/kernel/qinputcontext.cpp index 5433ae4..3b2d476 100644 --- a/src/kernel/qinputcontext.cpp +++ b/src/kernel/qinputcontext.cpp @@ -477,6 +477,7 @@ bool QInputContext::isComposing() const */ bool QInputContext::filterEvent( const QEvent *event ) { + Q_UNUSED(event); return FALSE; } @@ -679,6 +680,11 @@ void QInputContext::unsetFocus() */ void QInputContext::setMicroFocus( int x, int y, int w, int h, QFont *f ) { + Q_UNUSED(x); + Q_UNUSED(y); + Q_UNUSED(w); + Q_UNUSED(h); + Q_UNUSED(f); } @@ -705,6 +711,9 @@ void QInputContext::mouseHandler( int x, QEvent::Type type, Qt::ButtonState button, Qt::ButtonState state ) { + Q_UNUSED(x); + Q_UNUSED(button); + Q_UNUSED(state); // Default behavior for simple ephemeral input contexts. Some // complex input contexts should not be reset here. if ( type == QEvent::MouseButtonPress || diff --git a/src/kernel/qinputcontext_x11.cpp b/src/kernel/qinputcontext_x11.cpp index 8bdfa5e..e7c82c1 100644 --- a/src/kernel/qinputcontext_x11.cpp +++ b/src/kernel/qinputcontext_x11.cpp @@ -67,6 +67,8 @@ */ bool QInputContext::x11FilterEvent( QWidget *keywidget, XEvent *event ) { + Q_UNUSED(keywidget); + Q_UNUSED(event); return FALSE; } diff --git a/src/kernel/qjpegio.cpp b/src/kernel/qjpegio.cpp index 5d2a1b1..bdb4c27 100644 --- a/src/kernel/qjpegio.cpp +++ b/src/kernel/qjpegio.cpp @@ -80,7 +80,7 @@ void my_error_exit (j_common_ptr cinfo) my_error_mgr* myerr = (my_error_mgr*) cinfo->err; char buffer[JMSG_LENGTH_MAX]; (*cinfo->err->format_message)(cinfo, buffer); - qWarning(buffer); + qWarning("%s", buffer); longjmp(myerr->setjmp_buffer, 1); } diff --git a/src/kernel/qnetworkprotocol.cpp b/src/kernel/qnetworkprotocol.cpp index 4173584..e6c4a6a 100644 --- a/src/kernel/qnetworkprotocol.cpp +++ b/src/kernel/qnetworkprotocol.cpp @@ -381,6 +381,14 @@ public: of these values. */ +QNetworkProtocolFactoryBase::QNetworkProtocolFactoryBase() { + // +} + +QNetworkProtocolFactoryBase::~QNetworkProtocolFactoryBase() { + // +} + /*! Constructor of the network protocol base class. Does some initialization and connecting of signals and slots. diff --git a/src/kernel/qnetworkprotocol.h b/src/kernel/qnetworkprotocol.h index 096a9ad..fa350e3 100644 --- a/src/kernel/qnetworkprotocol.h +++ b/src/kernel/qnetworkprotocol.h @@ -64,6 +64,10 @@ template <class T> class QValueList; class Q_EXPORT QNetworkProtocolFactoryBase { public: + QNetworkProtocolFactoryBase(); + virtual ~QNetworkProtocolFactoryBase(); + +public: virtual QNetworkProtocol *createObject() = 0; }; diff --git a/src/kernel/qprocess_unix.cpp b/src/kernel/qprocess_unix.cpp index 2a4a2fd..c6066d4 100644 --- a/src/kernel/qprocess_unix.cpp +++ b/src/kernel/qprocess_unix.cpp @@ -379,7 +379,9 @@ void QProcessManager::sigchldHnd( int fd ) } char tmp; - ::read( fd, &tmp, sizeof(tmp) ); + if (::read( fd, &tmp, sizeof(tmp) ) < 0) { + qWarning( "Could not read from file descriptor" ); + } #if defined(QT_QPROCESS_DEBUG) qDebug( "QProcessManager::sigchldHnd()" ); #endif @@ -562,7 +564,9 @@ QT_SIGNAL_RETTYPE qt_C_sigchldHnd( QT_SIGNAL_ARGS ) return; char a = 1; - ::write( QProcessPrivate::procManager->sigchldFd[0], &a, sizeof(a) ); + if (::write( QProcessPrivate::procManager->sigchldFd[0], &a, sizeof(a) ) < 0) { + qWarning( "Could not write to file descriptor" ); + } } diff --git a/src/kernel/qscriptengine_x11.cpp b/src/kernel/qscriptengine_x11.cpp index 7d2b77d..b87680b 100644 --- a/src/kernel/qscriptengine_x11.cpp +++ b/src/kernel/qscriptengine_x11.cpp @@ -2725,11 +2725,7 @@ static bool khmer_shape_syllable(QOpenType *openType, QShaperItem *item) #ifndef QT_NO_XFTFREETYPE if (openType) { - unsigned short logClusters[16]; - for (int i = 0; i < len; ++i) - logClusters[i] = i; - - uint where[16]; + uint where[16]; for (int i = 0; i < len; ++i) { where[i] = ~(PreSubstProperty @@ -3236,11 +3232,7 @@ static bool myanmar_shape_syllable(QOpenType *openType, QShaperItem *item, bool #ifndef QT_NO_XFTFREETYPE if (openType) { - unsigned short logClusters[32]; - for (int i = 0; i < len; ++i) - logClusters[i] = i; - - uint where[32]; + uint where[32]; for (int i = 0; i < len; ++i) { where[i] = ~(PreSubstProperty diff --git a/src/kernel/qstyle.h b/src/kernel/qstyle.h index cf7a235..0efc386 100644 --- a/src/kernel/qstyle.h +++ b/src/kernel/qstyle.h @@ -290,6 +290,7 @@ class Q_EXPORT QStyleControlElementData { QString caption; QStyleControlElementGenericWidgetData topLevelWidgetData; Q_UINT32 topLevelWidgetFlags; + QPixmap paletteBgPixmap; }; class Q_EXPORT QStyleWidgetActionRequestData { @@ -1070,6 +1071,18 @@ public: // bool - whether or not the upper two button drawing areas should be combined into one SH_ScrollBar_CombineSubLineRegionDrawingAreas, + // Qt::QRgb - color of the popup menu arrow (active, menuitem enabled) + SH_PopupMenu_SubMenuArrowColorActiveEnabled, + + // Qt::QRgb - color of the popup menu arrow (active, menuitem disabled) + SH_PopupMenu_SubMenuArrowColorActiveDisabled, + + // Qt::QRgb - color of the popup menu arrow (inactive, menuitem enabled) + SH_PopupMenu_SubMenuArrowColorInactiveEnabled, + + // Qt::QRgb - color of the popup menu arrow (active, menuitem disabled) + SH_PopupMenu_SubMenuArrowColorInactiveDisabled, + // do not add any values below/greater than this SH_CustomBase = 0xf0000000 }; diff --git a/src/network/qdns.cpp b/src/network/qdns.cpp index 33f6d2e..0b41d6c 100644 --- a/src/network/qdns.cpp +++ b/src/network/qdns.cpp @@ -102,11 +102,17 @@ static Q_UINT32 now() return 0; } +#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 3))) +#define Q_MODERN_RES_API +#else +#endif static QPtrList<QHostAddress> * ns = 0; static QStrList * domains = 0; static bool ipv6support = FALSE; +#if defined(Q_MODERN_RES_API) +#else static int qdns_res_init() { #ifdef Q_OS_MAC @@ -124,6 +130,7 @@ static int qdns_res_init() return 0; // not called at all on Windows. #endif } +#endif class QDnsPrivate { @@ -2539,11 +2546,6 @@ void QDns::doSynchronousLookup() } #endif -#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 3))) -#define Q_MODERN_RES_API -#else -#endif - void QDns::doResInit() { if ( ns ) diff --git a/src/sql/qsqldatabase.cpp b/src/sql/qsqldatabase.cpp index eaa7a70..af069a4 100644 --- a/src/sql/qsqldatabase.cpp +++ b/src/sql/qsqldatabase.cpp @@ -144,6 +144,12 @@ public: QSqlQuery createQuery() const { return QSqlQuery( new QNullResult(this) ); } }; +QSqlDriverCreatorBase::QSqlDriverCreatorBase() { +} + +QSqlDriverCreatorBase::~QSqlDriverCreatorBase() { +} + typedef QDict<QSqlDriverCreatorBase> QDriverDict; class QSqlDatabaseManager : public QObject diff --git a/src/sql/qsqldatabase.h b/src/sql/qsqldatabase.h index 3186956..fb07513 100644 --- a/src/sql/qsqldatabase.h +++ b/src/sql/qsqldatabase.h @@ -66,6 +66,9 @@ class QSqlDatabasePrivate; class QM_EXPORT_SQL QSqlDriverCreatorBase { public: + QSqlDriverCreatorBase(); + virtual ~QSqlDriverCreatorBase(); +public: virtual QSqlDriver* createObject() = 0; }; diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp index a44ee9f..0ab98b4 100644 --- a/src/styles/qcommonstyle.cpp +++ b/src/styles/qcommonstyle.cpp @@ -347,6 +347,11 @@ QStyleControlElementData populateControlElementDataFromWidget(const QWidget* wid const QButton *button = dynamic_cast<const QButton*>(widget); if (button) { ceData.text = button->text(); + const QPixmap* paletteBgPixmap = 0; + paletteBgPixmap = button->paletteBackgroundPixmap(); + if (paletteBgPixmap) { + ceData.paletteBgPixmap = *paletteBgPixmap; + } } } if (ceData.widgetObjectTypes.contains("QTabBar")) { @@ -3215,6 +3220,13 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleControlElementData &ceData ret = 0; break; + case SH_PopupMenu_SubMenuArrowColorActiveEnabled: + case SH_PopupMenu_SubMenuArrowColorActiveDisabled: + case SH_PopupMenu_SubMenuArrowColorInactiveEnabled: + case SH_PopupMenu_SubMenuArrowColorInactiveDisabled: + ret = -1; + break; + default: ret = 0; break; diff --git a/src/widgets/qlistview.cpp b/src/widgets/qlistview.cpp index 385ad04..6f8ec29 100644 --- a/src/widgets/qlistview.cpp +++ b/src/widgets/qlistview.cpp @@ -265,6 +265,7 @@ class QListViewToolTip : public QToolTip { public: QListViewToolTip( QWidget *parent, QListView *lv ); + virtual ~QListViewToolTip(); void maybeTip( const QPoint &pos ); @@ -278,6 +279,10 @@ QListViewToolTip::QListViewToolTip( QWidget *parent, QListView *lv ) { } +QListViewToolTip::~QListViewToolTip() +{ +} + void QListViewToolTip::maybeTip( const QPoint &pos ) { if ( !parentWidget() || !view || !view->showToolTips() ) diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp index 086c423..8821537 100644 --- a/src/widgets/qpopupmenu.cpp +++ b/src/widgets/qpopupmenu.cpp @@ -1391,6 +1391,7 @@ void QPopupMenu::show() performDelayedChanges(); updateSize(TRUE); QWidget::show(); + updateSize(); popupActive = -1; if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this)) d->mouseMoveBuffer = QRegion(); diff --git a/src/widgets/qtooltip.cpp b/src/widgets/qtooltip.cpp index ed1a34e..f4ed6f4 100644 --- a/src/widgets/qtooltip.cpp +++ b/src/widgets/qtooltip.cpp @@ -824,6 +824,10 @@ QToolTip::QToolTip( QWidget * widget, QToolTipGroup * group ) QString::null, g, QString::null, this, FALSE ); } +QToolTip::~QToolTip() +{ +} + /*! Adds a tool tip to \a widget. \a text is the text to be shown in diff --git a/src/widgets/qtooltip.h b/src/widgets/qtooltip.h index 2cd38c1..3146d7e 100644 --- a/src/widgets/qtooltip.h +++ b/src/widgets/qtooltip.h @@ -92,6 +92,7 @@ class Q_EXPORT QToolTip: public Qt { public: QToolTip( QWidget *, QToolTipGroup * = 0 ); + virtual ~QToolTip(); //### add virtual d'tor for 4.0 static void add( QWidget *, const QString &); |