* 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
* 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.
],
[
QString s("mangle_failure");
- #if (QT_VERSION < 221)
+ #if (QT_VERSION < 0x030000)
break_me_(\\\);
#endif
],
{
wa_ptr = this;
-#if QT_VERSION >= 300
if (!QApplication::clipboard()->supportsSelection())
return;
}
// 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();
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')));
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)
{
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
}
{
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
}