From c2f89fd0d9d13a0da1ecc33414860795721261a7 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 16 Apr 2009 20:06:15 +1000 Subject: Remove obsolete code. Remove the last few unnecessary directives using obsolete values of QT_VERSION. There are a few references to old QT_VERSION's left, but they are legitimate and should not be removed. Reviewed-by: Trust Me --- doc/src/snippets/alphachannel.cpp | 7 +------ tools/qvfb/qvfb.cpp | 10 +--------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/doc/src/snippets/alphachannel.cpp b/doc/src/snippets/alphachannel.cpp index 7783271..ad0885a 100644 --- a/doc/src/snippets/alphachannel.cpp +++ b/doc/src/snippets/alphachannel.cpp @@ -47,11 +47,8 @@ #include #include #include - -#if (QT_VERSION) >= 0x040000 #include #include -#endif class MyClass : public QWidget { @@ -95,12 +92,10 @@ protected: //! [0] } - QPixmap channelImage, pixmap; + QPixmap channelImage, pixmap; QSize sizeHint() const { return QSize(500, 500); } }; - - int main(int argc, char **argv) { QApplication app(argc, argv); diff --git a/tools/qvfb/qvfb.cpp b/tools/qvfb/qvfb.cpp index b6a715c..62149a1 100644 --- a/tools/qvfb/qvfb.cpp +++ b/tools/qvfb/qvfb.cpp @@ -217,16 +217,10 @@ QVFb::QVFb( int display_id, int w, int h, int d, int r, const QString &skin, Dis setWindowIcon( pix ); rateDlg = 0; refreshRate = 30; -#if QT_VERSION >= 0x030000 - // When compiling with Qt 3 we need to create the menu first to - // avoid scroll bars in the main window + // Create the menu first to avoid scroll bars in the main window createMenu( menuBar() ); init( display_id, w, h, d, r, skin ); enableCursor( true ); -#else - init( display_id, w, h, d, r, skin ); - createMenu( menuBar() ); -#endif } QVFb::~QVFb() @@ -354,9 +348,7 @@ void QVFb::init( int display_id, int pw, int ph, int d, int r, const QString& sk scroller->setWidget(view); view->setContentsMargins( 0, 0, 0, 0 ); setCentralWidget(scroller); -#if QT_VERSION >= 0x030000 ph += 2; // avoid scrollbar -#endif scroller->show(); // delete defaultbuttons.conf if it was left behind... unlink(QFileInfo(QString("/tmp/qtembedded-%1/defaultbuttons.conf").arg(view->displayId())).absoluteFilePath().toLatin1().constData()); -- cgit v0.12