Fix a number of build warnings that could lead to unstable operation

This breaks the ABI
pull/2/head
Timothy Pearson 12 years ago
parent bb07131a91
commit 7aa5ac7f0e

@ -290,7 +290,6 @@ ftglue_face_goto_table( FT_Face face,
if ( face->num_faces > 1 ) if ( face->num_faces > 1 )
{ {
/* deal with TrueType collections */ /* deal with TrueType collections */
FT_ULong offset;
LOG(( ">> This is a TrueType Collection\n" )); LOG(( ">> This is a TrueType Collection\n" ));
@ -298,8 +297,6 @@ ftglue_face_goto_table( FT_Face face,
ACCESS_Frame( 4 ) ) ACCESS_Frame( 4 ) )
goto Exit; goto Exit;
offset = GET_ULong();
FORGET_Frame(); FORGET_Frame();
} }

@ -83,6 +83,9 @@
#endif #endif
class Q_EXPORT_CODECS_JP QJpUnicodeConv { class Q_EXPORT_CODECS_JP QJpUnicodeConv {
public:
virtual ~QJpUnicodeConv() {}
public: public:
enum Rules { enum Rules {
// "ASCII" is ANSI X.3.4-1986, a.k.a. US-ASCII here. // "ASCII" is ANSI X.3.4-1986, a.k.a. US-ASCII here.

@ -381,6 +381,7 @@ class QIconViewToolTip : public QToolTip
{ {
public: public:
QIconViewToolTip( QWidget *parent, QIconView *iv ); QIconViewToolTip( QWidget *parent, QIconView *iv );
virtual ~QIconViewToolTip();
void maybeTip( const QPoint &pos ); void maybeTip( const QPoint &pos );
@ -393,6 +394,10 @@ QIconViewToolTip::QIconViewToolTip( QWidget *parent, QIconView *iv )
{ {
} }
QIconViewToolTip::~QIconViewToolTip()
{
}
void QIconViewToolTip::maybeTip( const QPoint &pos ) void QIconViewToolTip::maybeTip( const QPoint &pos )
{ {
if ( !parentWidget() || !view || view->wordWrapIconText() || !view->showToolTips() ) if ( !parentWidget() || !view || view->wordWrapIconText() || !view->showToolTips() )

@ -430,7 +430,7 @@ static bool qt_x11EventFilter( XEvent* ev )
//XIM qt_xim = 0; //XIM qt_xim = 0;
Q_EXPORT XIMStyle qt_xim_style = 0; Q_EXPORT XIMStyle qt_xim_style = 0;
Q_EXPORT XIMStyle qt_xim_preferred_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 #endif
Q_EXPORT int qt_ximComposingKeycode=0; 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 return (event->type == ClientMessage && event->xclient.window == *(Window*)arg
&& event->xclient.message_type == qt_wm_protocols && 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 #endif

@ -1749,9 +1749,9 @@ QColorDrag::QColorDrag( QWidget *dragsource, const char *name )
void QColorDrag::setColor( const QColor &col ) void QColorDrag::setColor( const QColor &col )
{ {
short r = (col.red() << 8) | col.red(); unsigned short r = (col.red() << 8) | col.red();
short g = (col.green() << 8) | col.green(); unsigned short g = (col.green() << 8) | col.green();
short b = (col.blue() << 8) | col.blue(); unsigned short b = (col.blue() << 8) | col.blue();
// make sure we transmit data in network order // make sure we transmit data in network order
r = htons(r); r = htons(r);

@ -505,7 +505,9 @@ void QEventLoop::wakeUp()
size_t nbytes = 0; size_t nbytes = 0;
char c = 0; char c = 0;
if ( ::ioctl( d->thread_pipe[0], FIONREAD, (char*)&nbytes ) >= 0 && nbytes == 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!
}
} }
} }

@ -5424,6 +5424,7 @@ static void write_pbm_image( QImageIO *iio )
class QImageIOFrameGrabber : public QImageConsumer { class QImageIOFrameGrabber : public QImageConsumer {
public: public:
QImageIOFrameGrabber() : framecount(0) { } QImageIOFrameGrabber() : framecount(0) { }
virtual ~QImageIOFrameGrabber() { }
QImageDecoder *decoder; QImageDecoder *decoder;
int framecount; int framecount;

@ -477,6 +477,7 @@ bool QInputContext::isComposing() const
*/ */
bool QInputContext::filterEvent( const QEvent *event ) bool QInputContext::filterEvent( const QEvent *event )
{ {
Q_UNUSED(event);
return FALSE; return FALSE;
} }
@ -679,6 +680,11 @@ void QInputContext::unsetFocus()
*/ */
void QInputContext::setMicroFocus( int x, int y, int w, int h, QFont *f ) 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 button,
Qt::ButtonState state ) Qt::ButtonState state )
{ {
Q_UNUSED(x);
Q_UNUSED(button);
Q_UNUSED(state);
// Default behavior for simple ephemeral input contexts. Some // Default behavior for simple ephemeral input contexts. Some
// complex input contexts should not be reset here. // complex input contexts should not be reset here.
if ( type == QEvent::MouseButtonPress || if ( type == QEvent::MouseButtonPress ||

@ -67,6 +67,8 @@
*/ */
bool QInputContext::x11FilterEvent( QWidget *keywidget, XEvent *event ) bool QInputContext::x11FilterEvent( QWidget *keywidget, XEvent *event )
{ {
Q_UNUSED(keywidget);
Q_UNUSED(event);
return FALSE; return FALSE;
} }

@ -80,7 +80,7 @@ void my_error_exit (j_common_ptr cinfo)
my_error_mgr* myerr = (my_error_mgr*) cinfo->err; my_error_mgr* myerr = (my_error_mgr*) cinfo->err;
char buffer[JMSG_LENGTH_MAX]; char buffer[JMSG_LENGTH_MAX];
(*cinfo->err->format_message)(cinfo, buffer); (*cinfo->err->format_message)(cinfo, buffer);
qWarning(buffer); qWarning("%s", buffer);
longjmp(myerr->setjmp_buffer, 1); longjmp(myerr->setjmp_buffer, 1);
} }

@ -381,6 +381,14 @@ public:
of these values. of these values.
*/ */
QNetworkProtocolFactoryBase::QNetworkProtocolFactoryBase() {
//
}
QNetworkProtocolFactoryBase::~QNetworkProtocolFactoryBase() {
//
}
/*! /*!
Constructor of the network protocol base class. Does some Constructor of the network protocol base class. Does some
initialization and connecting of signals and slots. initialization and connecting of signals and slots.

@ -63,6 +63,10 @@ template <class T> class QValueList;
class Q_EXPORT QNetworkProtocolFactoryBase class Q_EXPORT QNetworkProtocolFactoryBase
{ {
public:
QNetworkProtocolFactoryBase();
virtual ~QNetworkProtocolFactoryBase();
public: public:
virtual QNetworkProtocol *createObject() = 0; virtual QNetworkProtocol *createObject() = 0;

@ -379,7 +379,9 @@ void QProcessManager::sigchldHnd( int fd )
} }
char tmp; 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) #if defined(QT_QPROCESS_DEBUG)
qDebug( "QProcessManager::sigchldHnd()" ); qDebug( "QProcessManager::sigchldHnd()" );
#endif #endif
@ -562,7 +564,9 @@ QT_SIGNAL_RETTYPE qt_C_sigchldHnd( QT_SIGNAL_ARGS )
return; return;
char a = 1; 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" );
}
} }

@ -2725,11 +2725,7 @@ static bool khmer_shape_syllable(QOpenType *openType, QShaperItem *item)
#ifndef QT_NO_XFTFREETYPE #ifndef QT_NO_XFTFREETYPE
if (openType) { if (openType) {
unsigned short logClusters[16]; uint where[16];
for (int i = 0; i < len; ++i)
logClusters[i] = i;
uint where[16];
for (int i = 0; i < len; ++i) { for (int i = 0; i < len; ++i) {
where[i] = ~(PreSubstProperty where[i] = ~(PreSubstProperty
@ -3236,11 +3232,7 @@ static bool myanmar_shape_syllable(QOpenType *openType, QShaperItem *item, bool
#ifndef QT_NO_XFTFREETYPE #ifndef QT_NO_XFTFREETYPE
if (openType) { if (openType) {
unsigned short logClusters[32]; uint where[32];
for (int i = 0; i < len; ++i)
logClusters[i] = i;
uint where[32];
for (int i = 0; i < len; ++i) { for (int i = 0; i < len; ++i) {
where[i] = ~(PreSubstProperty where[i] = ~(PreSubstProperty

@ -290,6 +290,7 @@ class Q_EXPORT QStyleControlElementData {
QString caption; QString caption;
QStyleControlElementGenericWidgetData topLevelWidgetData; QStyleControlElementGenericWidgetData topLevelWidgetData;
Q_UINT32 topLevelWidgetFlags; Q_UINT32 topLevelWidgetFlags;
QPixmap paletteBgPixmap;
}; };
class Q_EXPORT QStyleWidgetActionRequestData { class Q_EXPORT QStyleWidgetActionRequestData {
@ -1070,6 +1071,18 @@ public:
// bool - whether or not the upper two button drawing areas should be combined into one // bool - whether or not the upper two button drawing areas should be combined into one
SH_ScrollBar_CombineSubLineRegionDrawingAreas, 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 // do not add any values below/greater than this
SH_CustomBase = 0xf0000000 SH_CustomBase = 0xf0000000
}; };

@ -102,11 +102,17 @@ static Q_UINT32 now()
return 0; 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 QPtrList<QHostAddress> * ns = 0;
static QStrList * domains = 0; static QStrList * domains = 0;
static bool ipv6support = FALSE; static bool ipv6support = FALSE;
#if defined(Q_MODERN_RES_API)
#else
static int qdns_res_init() static int qdns_res_init()
{ {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
@ -124,6 +130,7 @@ static int qdns_res_init()
return 0; // not called at all on Windows. return 0; // not called at all on Windows.
#endif #endif
} }
#endif
class QDnsPrivate { class QDnsPrivate {
@ -2539,11 +2546,6 @@ void QDns::doSynchronousLookup()
} }
#endif #endif
#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 3)))
#define Q_MODERN_RES_API
#else
#endif
void QDns::doResInit() void QDns::doResInit()
{ {
if ( ns ) if ( ns )

@ -144,6 +144,12 @@ public:
QSqlQuery createQuery() const { return QSqlQuery( new QNullResult(this) ); } QSqlQuery createQuery() const { return QSqlQuery( new QNullResult(this) ); }
}; };
QSqlDriverCreatorBase::QSqlDriverCreatorBase() {
}
QSqlDriverCreatorBase::~QSqlDriverCreatorBase() {
}
typedef QDict<QSqlDriverCreatorBase> QDriverDict; typedef QDict<QSqlDriverCreatorBase> QDriverDict;
class QSqlDatabaseManager : public QObject class QSqlDatabaseManager : public QObject

@ -65,6 +65,9 @@ class QSqlDatabasePrivate;
class QM_EXPORT_SQL QSqlDriverCreatorBase class QM_EXPORT_SQL QSqlDriverCreatorBase
{ {
public:
QSqlDriverCreatorBase();
virtual ~QSqlDriverCreatorBase();
public: public:
virtual QSqlDriver* createObject() = 0; virtual QSqlDriver* createObject() = 0;
}; };

@ -347,6 +347,11 @@ QStyleControlElementData populateControlElementDataFromWidget(const QWidget* wid
const QButton *button = dynamic_cast<const QButton*>(widget); const QButton *button = dynamic_cast<const QButton*>(widget);
if (button) { if (button) {
ceData.text = button->text(); ceData.text = button->text();
const QPixmap* paletteBgPixmap = 0;
paletteBgPixmap = button->paletteBackgroundPixmap();
if (paletteBgPixmap) {
ceData.paletteBgPixmap = *paletteBgPixmap;
}
} }
} }
if (ceData.widgetObjectTypes.contains("QTabBar")) { if (ceData.widgetObjectTypes.contains("QTabBar")) {
@ -3215,6 +3220,13 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleControlElementData &ceData
ret = 0; ret = 0;
break; break;
case SH_PopupMenu_SubMenuArrowColorActiveEnabled:
case SH_PopupMenu_SubMenuArrowColorActiveDisabled:
case SH_PopupMenu_SubMenuArrowColorInactiveEnabled:
case SH_PopupMenu_SubMenuArrowColorInactiveDisabled:
ret = -1;
break;
default: default:
ret = 0; ret = 0;
break; break;

@ -265,6 +265,7 @@ class QListViewToolTip : public QToolTip
{ {
public: public:
QListViewToolTip( QWidget *parent, QListView *lv ); QListViewToolTip( QWidget *parent, QListView *lv );
virtual ~QListViewToolTip();
void maybeTip( const QPoint &pos ); void maybeTip( const QPoint &pos );
@ -278,6 +279,10 @@ QListViewToolTip::QListViewToolTip( QWidget *parent, QListView *lv )
{ {
} }
QListViewToolTip::~QListViewToolTip()
{
}
void QListViewToolTip::maybeTip( const QPoint &pos ) void QListViewToolTip::maybeTip( const QPoint &pos )
{ {
if ( !parentWidget() || !view || !view->showToolTips() ) if ( !parentWidget() || !view || !view->showToolTips() )

@ -1391,6 +1391,7 @@ void QPopupMenu::show()
performDelayedChanges(); performDelayedChanges();
updateSize(TRUE); updateSize(TRUE);
QWidget::show(); QWidget::show();
updateSize();
popupActive = -1; popupActive = -1;
if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this)) if(style().styleHint(QStyle::SH_PopupMenu_SubMenuPopupDelay, this))
d->mouseMoveBuffer = QRegion(); d->mouseMoveBuffer = QRegion();

@ -824,6 +824,10 @@ QToolTip::QToolTip( QWidget * widget, QToolTipGroup * group )
QString::null, g, QString::null, this, FALSE ); 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 Adds a tool tip to \a widget. \a text is the text to be shown in

@ -92,6 +92,7 @@ class Q_EXPORT QToolTip: public Qt
{ {
public: public:
QToolTip( QWidget *, QToolTipGroup * = 0 ); QToolTip( QWidget *, QToolTipGroup * = 0 );
virtual ~QToolTip();
//### add virtual d'tor for 4.0 //### add virtual d'tor for 4.0
static void add( QWidget *, const QString &); static void add( QWidget *, const QString &);

Loading…
Cancel
Save