author | ar <ar> | 2005-01-21 19:56:15 (UTC) |
---|---|---|
committer | ar <ar> | 2005-01-21 19:56:15 (UTC) |
commit | cd51d382be50bc021739395309e23760f1619759 (patch) (side-by-side diff) | |
tree | e76155f772df7faea5fcf38667c6da8c916208db /library | |
parent | fdc37fbd908472e28735a8f0b01e3e66a43535e0 (diff) | |
download | opie-cd51d382be50bc021739395309e23760f1619759.zip opie-cd51d382be50bc021739395309e23760f1619759.tar.gz opie-cd51d382be50bc021739395309e23760f1619759.tar.bz2 |
- make opie compilable against qte 2.3.10 snapshot
check QT_VERSION against 0x030000 instead of 300
-rw-r--r-- | library/lightstyle.cpp | 10 | ||||
-rw-r--r-- | library/lightstyle.h | 2 | ||||
-rw-r--r-- | library/qpeapplication.cpp | 4 | ||||
-rw-r--r-- | library/qpestyle.cpp | 4 | ||||
-rw-r--r-- | library/qpestyle.h | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/library/lightstyle.cpp b/library/lightstyle.cpp index f18bdca..3bd1623 100644 --- a/library/lightstyle.cpp +++ b/library/lightstyle.cpp @@ -14,17 +14,17 @@ ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "lightstyle.h" -#if QT_VERSION < 300 +#if QT_VERSION < 0x030000 #define INCLUDE_MENUITEM_DEF #include "qmenubar.h" #include "qapplication.h" #include "qpainter.h" #include "qpalette.h" #include "qframe.h" #include "qpushbutton.h" @@ -154,34 +154,34 @@ QSize LightStyle::indicatorSize() const } void LightStyle::polish(QWidget *widget) { if (widget->inherits("QPushButton")) widget->installEventFilter(this); -#if QT_VERSION >= 300 +#if QT_VERSION >= 0x030000 if (widget->inherits("QLineEdit")) { QLineEdit *lineedit = (QLineEdit *) widget; lineedit->setFrameShape(QFrame::StyledPanel); lineedit->setLineWidth(2); } #endif QWindowsStyle::polish(widget); } void LightStyle::unPolish(QWidget *widget) { if (widget->inherits("QPushButton")) widget->removeEventFilter(this); -#if QT_VERSION >= 300 +#if QT_VERSION >= 0x030000 if (widget->inherits("QLineEdit")) { QLineEdit *lineedit = (QLineEdit *) widget; lineedit->setLineWidth(1); lineedit->setFrameShape(QFrame::WinPanel); } #endif QWindowsStyle::unPolish(widget); @@ -409,34 +409,34 @@ void LightStyle::drawComboButton(QPainter *p, int x, int y, int w, int h, r.width() + defaultFrameWidth(), r.height() + defaultFrameWidth(), g, TRUE); } int indent = ((y + h) / 2) - 3; int xpos = x; -#if QT_VERSION >= 300 +#if QT_VERSION >= 0x030000 if( QApplication::reverseLayout() ) xpos += indent; else #endif xpos += w - indent - 5; drawArrow(p, Qt::DownArrow, TRUE, xpos, indent, 5, 5, g, TRUE, fill); } QRect LightStyle::comboButtonRect( int x, int y, int w, int h ) const { QRect r(x + 3, y + 3, w - 6, h - 6); int indent = ((y + h) / 2) - 3; r.setRight(r.right() - indent - 10); -#if QT_VERSION >= 300 +#if QT_VERSION >= 0x030000 if( QApplication::reverseLayout() ) r.moveBy( indent + 10, 0 ); #endif return r; } diff --git a/library/lightstyle.h b/library/lightstyle.h index c377cc2..0392957 100644 --- a/library/lightstyle.h +++ b/library/lightstyle.h @@ -21,17 +21,17 @@ #define LIGHTSTYLE_H #ifndef QT_H #include <qstyle.h> #include <qwindowsstyle.h> #endif // QT_H -#if QT_VERSION < 300 +#if QT_VERSION < 0x030000 #ifdef QT_PLUGIN_STYLE_LIGHT # define Q_EXPORT_STYLE_LIGHT #else # define Q_EXPORT_STYLE_LIGHT Q_EXPORT #endif // QT_PLUGIN_STYLE_LIGHT diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index af00f49..1c5ced3 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -55,17 +55,17 @@ #include <qwidgetlist.h> #include <qpixmapcache.h> #if defined(Q_WS_QWS) && !defined(QT_NO_COP) #define QTOPIA_INTERNAL_INITAPP #include "qpeapplication.h" #include "qpestyle.h" #include "styleinterface.h" -#if QT_VERSION >= 300 +#if QT_VERSION >= 0x030000 #include <qstylefactory.h> #else #include <qplatinumstyle.h> #include <qwindowsstyle.h> #include <qmotifstyle.h> #include <qmotifplusstyle.h> #include "lightstyle.h" @@ -1838,17 +1838,17 @@ bool QPEApplication::keepRunning() const return d->keep_running; } /*! \internal */ void QPEApplication::internalSetStyle( const QString &style ) { -#if QT_VERSION >= 300 +#if QT_VERSION >= 0x030000 if ( style == "QPE" ) { setStyle( new QPEStyle ); } else { QStyle *s = QStyleFactory::create( style ); if ( s ) setStyle( s ); } diff --git a/library/qpestyle.cpp b/library/qpestyle.cpp index b61ada4..0566f6b 100644 --- a/library/qpestyle.cpp +++ b/library/qpestyle.cpp @@ -18,17 +18,17 @@ ** **********************************************************************/ #include "qpestyle.h" #define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2) -#if QT_VERSION >= 300 +#if QT_VERSION >= 0x030000 #include <qdrawutil.h> #include <qcombobox.h> #include <qtabbar.h> QPEStyle::QPEStyle() { } @@ -424,17 +424,17 @@ QSize QPEStyle::sizeFromContents( ContentsType contents, const QWidget *widget, #include <qframe.h> #include <qtabbar.h> #define INCLUDE_MENUITEM_DEF #include <qmenudata.h> QPEStyle::QPEStyle() { -#if QT_VERSION < 300 +#if QT_VERSION < 0x030000 setButtonMargin(buttonMargin()); setScrollBarExtent(scrollBarExtent().width(),scrollBarExtent().height()); #endif } QPEStyle::~QPEStyle() { } diff --git a/library/qpestyle.h b/library/qpestyle.h index 19ef346..1bde0ff 100644 --- a/library/qpestyle.h +++ b/library/qpestyle.h @@ -20,17 +20,17 @@ #ifndef QPESTYLE_H #define QPESTYLE_H #ifndef QT_H #include "qwindowsstyle.h" #endif // QT_H -#if QT_VERSION >= 300 +#if QT_VERSION >= 0x030000 class Q_EXPORT QPEStyle : public QWindowsStyle { public: QPEStyle(); virtual ~QPEStyle(); virtual void drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags=Style_Default, const QStyleOption & = QStyleOption::Default) const; |