mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
Bump the Qt requirement to version 4.0.0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21607 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e5eabfe067
commit
1f4e5c926a
@ -30,10 +30,8 @@ Action::Action(GuiView & lyxView, QIcon const & icon,
|
||||
QString const & tooltip)
|
||||
: QAction(&lyxView), func_(func), lyxView_(lyxView)
|
||||
{
|
||||
#if QT_VERSION >= 0x040200
|
||||
// only Qt/Mac handles that
|
||||
setMenuRole(NoRole);
|
||||
#endif
|
||||
setIcon(icon);
|
||||
setText(text);
|
||||
setToolTip(tooltip);
|
||||
|
@ -94,22 +94,18 @@ private:
|
||||
|
||||
void showEvent(QShowEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
QSettings settings;
|
||||
std::string key = name_ + "/geometry";
|
||||
QDialog::restoreGeometry(settings.value(key.c_str()).toByteArray());
|
||||
#endif
|
||||
QDialog::showEvent(e);
|
||||
}
|
||||
|
||||
void closeEvent(QCloseEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
QSettings settings;
|
||||
std::string key = name_ + "/geometry";
|
||||
settings.setValue(key.c_str(), QDialog::saveGeometry());
|
||||
#endif
|
||||
QDialog::closeEvent(e);
|
||||
QDialog::closeEvent(e);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -231,22 +231,18 @@ void GuiDialog::apply()
|
||||
|
||||
void GuiDialog::showEvent(QShowEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
QSettings settings;
|
||||
string key = name_ + "/geometry";
|
||||
restoreGeometry(settings.value(key.c_str()).toByteArray());
|
||||
#endif
|
||||
QDialog::showEvent(e);
|
||||
}
|
||||
|
||||
|
||||
void GuiDialog::closeEvent(QCloseEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
QSettings settings;
|
||||
string key = name_ + "/geometry";
|
||||
settings.setValue(key.c_str(), saveGeometry());
|
||||
#endif
|
||||
QDialog::closeEvent(e);
|
||||
}
|
||||
|
||||
|
@ -40,11 +40,9 @@ using std::make_pair;
|
||||
using std::pair;
|
||||
using std::vector;
|
||||
|
||||
#if QT_VERSION >= 0x040200
|
||||
QString const math_fonts[] = {"cmex10", "cmmi10", "cmr10", "cmsy10",
|
||||
"eufm10", "msam10", "msbm10", "wasy10", "esint10"};
|
||||
int const num_math_fonts = sizeof(math_fonts) / sizeof(*math_fonts);
|
||||
#endif
|
||||
|
||||
|
||||
namespace lyx {
|
||||
@ -197,7 +195,6 @@ static pair<QFont, bool> const getSymbolFont(QString const & family)
|
||||
|
||||
GuiFontLoader::GuiFontLoader()
|
||||
{
|
||||
#if QT_VERSION >= 0x040200
|
||||
QString const fonts_dir =
|
||||
toqstr(addPath(package().system_support().absFilename(), "fonts"));
|
||||
|
||||
@ -210,7 +207,6 @@ GuiFontLoader::GuiFontLoader()
|
||||
(fontID < 0 ? " FAIL" : " OK")
|
||||
<< endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int i1 = 0; i1 < NUM_FAMILIES; ++i1)
|
||||
for (int i2 = 0; i2 < 2; ++i2)
|
||||
|
@ -150,7 +150,6 @@ void GuiMenubar::macxMenuBarInit()
|
||||
#ifdef Q_WS_MACX
|
||||
mac_menubar_ = new QMenuBar;
|
||||
|
||||
# if QT_VERSION >= 0x040200
|
||||
/* Since Qt 4.2, the qt/mac menu code has special code for
|
||||
specifying the role of a menu entry. However, it does not
|
||||
work very well with our scheme of creating menus on demand,
|
||||
@ -211,9 +210,6 @@ void GuiMenubar::macxMenuBarInit()
|
||||
qMenu->addAction(action);
|
||||
|
||||
}
|
||||
# else
|
||||
qt_mac_set_menubar_merge(false);
|
||||
# endif // QT_VERSION >= 0x040200
|
||||
#endif // Q_WS_MACX
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
// Set USE_PIXMAP_CACHE to 1 for enabling the use of a Pixmap cache when
|
||||
// drawing text. This is especially useful for older PPC/Mac systems.
|
||||
#if (QT_VERSION < 0x040200) || defined(Q_WS_X11)
|
||||
#if defined(Q_WS_X11)
|
||||
#define USE_PIXMAP_CACHE 0
|
||||
#else
|
||||
#define USE_PIXMAP_CACHE 1
|
||||
|
@ -97,21 +97,17 @@ private:
|
||||
|
||||
void showEvent(QShowEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
QSettings settings;
|
||||
std::string key = name_ + "/geometry";
|
||||
QDialog::restoreGeometry(settings.value(key.c_str()).toByteArray());
|
||||
#endif
|
||||
QDialog::showEvent(e);
|
||||
}
|
||||
|
||||
void closeEvent(QCloseEvent * e)
|
||||
{
|
||||
#if (QT_VERSION >= 0x040200)
|
||||
QSettings settings;
|
||||
std::string key = name_ + "/geometry";
|
||||
settings.setValue(key.c_str(), QDialog::saveGeometry());
|
||||
#endif
|
||||
QDialog::closeEvent(e);
|
||||
}
|
||||
|
||||
|
@ -1677,7 +1677,7 @@ void PrefUserInterface::update(LyXRC const & rc)
|
||||
autoSaveCB->setChecked(rc.make_backup);
|
||||
lastfilesSB->setValue(rc.num_lastfiles);
|
||||
pixmapCacheCB->setChecked(rc.use_pixmap_cache);
|
||||
#if (QT_VERSION < 0x040200) || defined(Q_WS_X11)
|
||||
#if defined(Q_WS_X11)
|
||||
pixmapCacheGB->setEnabled(false);
|
||||
#endif
|
||||
}
|
||||
|
@ -1025,9 +1025,7 @@ TabWorkArea::TabWorkArea(QWidget * parent) : QTabWidget(parent)
|
||||
this, SLOT(closeCurrentTab()));
|
||||
|
||||
setCornerWidget(closeTabButton);
|
||||
#if QT_VERSION >= 0x040200
|
||||
setUsesScrollButtons(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user