Changeset 5030
- Timestamp:
- 07/18/07 18:57:43 (17 months ago)
- Location:
- branches/qt-gui_qt4
- Files:
-
- 10 modified
-
CMakeLists.txt (modified) (1 diff)
-
src/contactlist/maincontactlistproxy.cpp (modified) (2 diffs)
-
src/contactlist/sortedcontactlistproxy.cpp (modified) (1 diff)
-
src/mainwin.cpp (modified) (1 diff)
-
src/mledit.cpp (modified) (1 diff)
-
src/mledit.h (modified) (1 diff)
-
src/mlview.cpp (modified) (2 diffs)
-
src/mlview.h (modified) (1 diff)
-
src/widgets/tabwidget.cpp (modified) (1 diff)
-
src/widgets/tabwidget.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/qt-gui_qt4/CMakeLists.txt
r5028 r5030 55 55 56 56 # Check for Qt4 57 set(QT_MIN_VERSION "4. 2.1")57 set(QT_MIN_VERSION "4.3.0") 58 58 set(QT_USE_QT3SUPPORT TRUE) 59 59 -
branches/qt-gui_qt4/src/contactlist/maincontactlistproxy.cpp
r4932 r5030 38 38 { 39 39 m_filterSystemGroups = enable; 40 #if QT_VERSION < 0x04030041 // filterChanged() is obsoleted in Qt 4.3 and should be replaced by invalidateFilter()42 filterChanged();43 #else44 40 invalidateFilter(); 45 #endif46 41 } 47 42 … … 49 44 { 50 45 m_filterSubGroups = enable; 51 #if QT_VERSION < 0x04030052 // filterChanged() is obsoleted in Qt 4.3 and should be replaced by invalidateFilter()53 filterChanged();54 #else55 46 invalidateFilter(); 56 #endif57 47 } 58 48 59 49 void CMainContactListProxy::configUpdated() 60 50 { 61 #if QT_VERSION < 0x04030062 // filterChanged() is obsoleted in Qt 4.3 and should be replaced by invalidateFilter()63 filterChanged();64 #else65 51 invalidateFilter(); 66 #endif67 52 } 68 53 -
branches/qt-gui_qt4/src/contactlist/sortedcontactlistproxy.cpp
r4924 r5030 45 45 // The value of m_sortOrder affects the behaviour of our lessThan() method 46 46 // so tell QSortFilterProxyModel to forget any cached values from lessThan() 47 #if QT_VERSION < 0x04030048 // clear() is obsoleted in Qt 4.3 and should be replaced by invalidate()49 clear();50 #else51 47 invalidate(); 52 #endif53 48 QSortFilterProxyModel::sort(column, Qt::AscendingOrder); 54 49 } -
branches/qt-gui_qt4/src/mainwin.cpp
r5002 r5030 4702 4702 4703 4703 // The send submenu and misc modes submenu that depend on sending capabilities 4704 #if QT_VERSION >= 0x0301004705 4704 #define HIDE_MENU(x, y, z) x->setItemVisible(y, z); 4706 #else4707 #define HIDE_MENU(x, y, z) x->setItemEnabled(y, false);4708 #endif4709 4705 4710 4706 HIDE_MENU(mnuUser, mnuUserSendMsg, nSendFuncs & PP_SEND_MSG) -
branches/qt-gui_qt4/src/mledit.cpp
r5002 r5030 62 62 GotoEnd(); 63 63 insert(s); 64 }65 66 void MLEditWrap::append(const QString& s)67 {68 MLEditWrapBase::append(s);69 if (strcmp(qVersion(), "3.0.0") == 0 ||70 strcmp(qVersion(), "3.0.1") == 0 ||71 strcmp(qVersion(), "3.0.2") == 0 ||72 strcmp(qVersion(), "3.0.3") == 0 ||73 strcmp(qVersion(), "3.0.4") == 0)74 {75 // Workaround --76 // In those versions, QTextEdit::append didn't add a new paragraph.77 MLEditWrapBase::append("\n");78 }79 64 } 80 65 -
branches/qt-gui_qt4/src/mledit.h
r5002 r5030 59 59 60 60 void appendNoNewLine(const QString& s); 61 void append(const QString& s);62 61 void GotoEnd(); 63 62 -
branches/qt-gui_qt4/src/mlview.cpp
r5002 r5030 38 38 { 39 39 setWordWrap(WidgetWidth); 40 #if QT_VERSION >= 0x03010041 40 setWrapPolicy(AtWordOrDocumentBoundary); 42 #else43 setWrapPolicy(AtWhiteSpace);44 #endif45 41 setReadOnly(true); 46 42 setTextFormat(Qt::RichText); … … 51 47 int p = paragraphs() - 1; 52 48 insertAt(s, p, paragraphLength(p)); 53 }54 55 void MLView::append(const QString& s)56 {57 if (strcmp(qVersion(), "3.0.0") == 0 ||58 strcmp(qVersion(), "3.0.1") == 0 ||59 strcmp(qVersion(), "3.0.2") == 0 ||60 strcmp(qVersion(), "3.0.3") == 0 ||61 strcmp(qVersion(), "3.0.4") == 0)62 {63 // Workaround --64 // In those versions, QTextEdit::append didn't add a new paragraph.65 Q3TextBrowser::append("<p>" + s);66 }67 else68 Q3TextBrowser::append(s);69 49 } 70 50 -
branches/qt-gui_qt4/src/mlview.h
r5002 r5030 33 33 34 34 void appendNoNewLine(const QString& s); 35 void append(const QString& s);36 35 void GotoHome(); 37 36 void GotoEnd(); -
branches/qt-gui_qt4/src/widgets/tabwidget.cpp
r5002 r5030 61 61 e->accept(); 62 62 } 63 64 #if QT_VERSION < 0x04030065 // tabAt() is added in Qt 4.3 so we have to make our own implementation for QT 4.266 int CTabBar::tabAt(const QPoint& position) const67 {68 for (int i = 0; i < count(); ++i)69 if (tabRect(i).contains(position))70 return i;71 72 return -1;73 }74 #endif75 63 76 64 void CTabBar::mousePressEvent(QMouseEvent* e) -
branches/qt-gui_qt4/src/widgets/tabwidget.h
r5002 r5030 42 42 virtual void mouseReleaseEvent(QMouseEvent* e); 43 43 44 #if QT_VERSION < 0x04030045 // tabAt is added in Qt 4.3 so we have to make our own implementation for QT 4.246 int tabAt(const QPoint& position) const;47 #endif48 49 44 int clickedTab; 50 45 };
