]> git.lyx.org Git - lyx.git/commitdiff
Remove qt2 support in the following files:
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Fri, 17 Mar 2006 19:02:43 +0000 (19:02 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Fri, 17 Mar 2006 19:02:43 +0000 (19:02 +0000)
* src/frontends/qt2/qt_helpers.C
(makeFontName):

* src/frontends/qt2/QWorkArea.C
(QWorkArea::haveSelection):
(QWorkArea::haveSelection):
(QWorkArea::getClipboard):

* src/frontends/qt2/panelstack.C
(PanelStack::PanelStack):

* src/frontends/qt4/qt_helpers.C
(makeFontName):

* README: remove notice about qt2

* config/qt.m4: make 3.0 the minimum required qt version

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13414 a592a061-630c-0410-9148-cb99ea01b6c8

README
config/qt.m4
src/frontends/qt2/QWorkArea.C
src/frontends/qt2/panelstack.C
src/frontends/qt2/qt_helpers.C
src/frontends/qt4/qt_helpers.C

diff --git a/README b/README
index 87c9f10f3c643144f048e19081e10af9a06919ad..884325b6133b89af6cedc8af222014b7465d888b 100644 (file)
--- a/README
+++ b/README
@@ -83,8 +83,7 @@ What do I need to compile LyX from the source distribution?
     * LibXpm, version 4.7 or newer.
 
     Or:
-    * The Qt library, version 3.0 or newer (although version 2.3
-    may work).
+    * The Qt library, version 3.0 or newer.
 
     Read the file "INSTALL" for more information on compiling.
 
index ff6b9adf5631985b6de36d4d690429e3007406bd..61eafb104e74f9e3be89b06e08ae5881adcf3ea8 100644 (file)
@@ -96,7 +96,7 @@ AC_DEFUN([QT_TRY_LINK],
                ],
        [
        QString s("mangle_failure");
-       #if (QT_VERSION < 221)
+       #if (QT_VERSION < 0x030000)
        break_me_(\\\);
        #endif
        ],
index 0dbefef5e3589bf4d4361fb77d32a0ced54aa025..a647a4cdfeb564f83a6a9787a6b1e3e539f37657 100644 (file)
@@ -184,7 +184,6 @@ void QWorkArea::haveSelection(bool own) const
 {
        wa_ptr = this;
 
-#if QT_VERSION >= 300
        if (!QApplication::clipboard()->supportsSelection())
                return;
 
@@ -194,15 +193,12 @@ void QWorkArea::haveSelection(bool own) const
        }
        // We don't need to do anything if own = false, as this case is
        // handled by QT.
-#endif
 }
 
 
 string const QWorkArea::getClipboard() const
 {
-#if QT_VERSION >= 300
        QApplication::clipboard()->setSelectionMode(true);
-#endif
        QString str = QApplication::clipboard()->text();
        if (str.isNull())
                return string();
@@ -217,9 +213,7 @@ string const QWorkArea::getClipboard() const
 
 void QWorkArea::putClipboard(string const & str) const
 {
-#if QT_VERSION >= 300
        QApplication::clipboard()->setSelectionMode(true);
-#endif
 #ifdef Q_OS_MAC
        // The MAC clipboard uses \r for lineendings, and we use \n
        QApplication::clipboard()->setText(toqstr(subst(str, '\n', '\r')));
index 1845c73b2afe18dc0ad4ac4e64b97efe861815a3..33d073d813c3532cf6f2eeb6258d82969168542b 100644 (file)
@@ -37,9 +37,7 @@ PanelStack::PanelStack(QWidget * parent, const char * name)
        list_->setVScrollBarMode(QScrollView::AlwaysOff);
        list_->addColumn("");
        list_->setColumnWidthMode(0, QListView::Maximum);
-#if QT_VERSION >= 300
        list_->setResizeMode(QListView::AllColumns);
-#endif
        list_->setRootIsDecorated(true);
        QWidget * w = static_cast<QWidget*>(list_->child("list view header"));
        if (w)
index 9dfa68efad3b4c2848897b3472a07aa760504a32..0317ff2b2e30df409958a7e8bf8c08ddef44370f 100644 (file)
@@ -38,29 +38,17 @@ string makeFontName(string const & family, string const & foundry)
 {
        if (foundry.empty())
                return family;
-#if QT_VERSION  >= 300
        return family + " [" + foundry + ']';
-#else
-       return foundry + '-' + family;
-#endif
 }
 
 
 pair<string,string> parseFontName(string const & name)
 {
-#if QT_VERSION  >= 300
        string::size_type const idx = name.find('[');
        if (idx == string::npos || idx == 0)
                return make_pair(name, string());
        return make_pair(name.substr(0, idx - 1),
                         name.substr(idx + 1, name.size() - idx - 2));
-#else
-       string::size_type const idx = name.find('-');
-       if (idx == string::npos || idx == 0)
-               return make_pair(name, string());
-       return make_pair(name.substr(idx + 1),
-                        name.substr(0, idx));
-#endif
 }
 
 
index ceab4ddb1c55ba9084606311308af1746bef484d..1b019f7a2cdef6d34396e15fa4c52ab15e1870e3 100644 (file)
@@ -38,29 +38,17 @@ string makeFontName(string const & family, string const & foundry)
 {
        if (foundry.empty())
                return family;
-#if QT_VERSION  >= 300
        return family + " [" + foundry + ']';
-#else
-       return foundry + '-' + family;
-#endif
 }
 
 
 pair<string,string> parseFontName(string const & name)
 {
-#if QT_VERSION  >= 300
        string::size_type const idx = name.find('[');
        if (idx == string::npos || idx == 0)
                return make_pair(name, string());
        return make_pair(name.substr(0, idx - 1),
                         name.substr(idx + 1, name.size() - idx - 2));
-#else
-       string::size_type const idx = name.find('-');
-       if (idx == string::npos || idx == 0)
-               return make_pair(name, string());
-       return make_pair(name.substr(idx + 1),
-                        name.substr(0, idx));
-#endif
 }