diff --git a/articleview.cc b/articleview.cc index 223e5f30..647683af 100644 --- a/articleview.cc +++ b/articleview.cc @@ -1928,7 +1928,6 @@ void ArticleView::contextMenuRequested( QPoint const & pos ) else if( result == saveImageAction || result == saveSoundAction ) { -#if QT_VERSION >= 0x040600 // QUrl url = ( result == saveImageAction ) ? imageUrl : targetUrl; QUrl url = targetUrl; QString savePath; @@ -1978,7 +1977,6 @@ void ArticleView::contextMenuRequested( QPoint const & pos ) emit storeResourceSavePath( QDir::toNativeSeparators( fileInfo.absoluteDir().absolutePath() ) ); saveResource( url, ui.definition->url(), fileName ); } -#endif } else { diff --git a/btreeidx.cc b/btreeidx.cc index 8a0016bb..d4ef84f3 100644 --- a/btreeidx.cc +++ b/btreeidx.cc @@ -1495,9 +1495,7 @@ bool BtreeDictionary::getHeadwords( QStringList &headwords ) if( setOfHeadwords.size() ) { -#if QT_VERSION >= 0x040700 headwords.reserve( setOfHeadwords.size() ); -#endif QSet< QString >::const_iterator it = setOfHeadwords.constBegin(); QSet< QString >::const_iterator end = setOfHeadwords.constEnd(); diff --git a/extlineedit.cc b/extlineedit.cc index 89834d59..1fb445fa 100644 --- a/extlineedit.cc +++ b/extlineedit.cc @@ -2,12 +2,8 @@ * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ #include "extlineedit.hh" - #include - -#if QT_VERSION >= 0x040600 #include -#endif ExtLineEdit::ExtLineEdit(QWidget *parent) : QLineEdit(parent) @@ -179,7 +175,6 @@ void IconButton::paintEvent(QPaintEvent *) void IconButton::animate(bool visible) { -#if QT_VERSION >= 0x040600 QPropertyAnimation *animation = new QPropertyAnimation(this, "opacity"); animation->setDuration(250); if (visible) @@ -191,7 +186,4 @@ void IconButton::animate(bool visible) animation->setEndValue(0.0); } animation->start(QAbstractAnimation::DeleteWhenStopped); -#else - setOpacity(visible ? 1.0 : 0.0); -#endif } diff --git a/gdappstyle.cc b/gdappstyle.cc index 75305d1c..d9b31f50 100644 --- a/gdappstyle.cc +++ b/gdappstyle.cc @@ -3,8 +3,6 @@ #include "gdappstyle.hh" -#if QT_VERSION >= 0x040600 - #include "dictionarybar.hh" #include @@ -53,5 +51,3 @@ bool GdAppStyle::dictionaryBarButton(const QWidget * widget) const { return false; } - -#endif // QT_VERSION diff --git a/gdappstyle.hh b/gdappstyle.hh index 006804fc..1b3bb9e1 100644 --- a/gdappstyle.hh +++ b/gdappstyle.hh @@ -5,9 +5,6 @@ #define GDAPPSTYLE_HH #include - -#if QT_VERSION >= 0x040600 - #include #include #include @@ -30,6 +27,4 @@ private: }; -#endif // QT_VERSION - #endif // GDAPPSTYLE_HH diff --git a/groups_widgets.cc b/groups_widgets.cc index 1a98a403..5775aba3 100644 --- a/groups_widgets.cc +++ b/groups_widgets.cc @@ -546,9 +546,7 @@ void DictListWidget::rowsAboutToBeRemoved( QModelIndex const & parent, int start DictGroupsWidget::DictGroupsWidget( QWidget * parent ): QTabWidget( parent ), nextId( 1 ), allDicts( 0 ), activeDicts( 0 ) { -#if QT_VERSION >= 0x040500 setMovable( true ); -#endif setContextMenuPolicy( Qt::CustomContextMenu ); connect( this, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( contextMenu( QPoint ) ) ); @@ -1023,9 +1021,7 @@ QuickFilterLine::QuickFilterLine( QWidget * parent ): ExtLineEdit( parent ), m_f { m_proxyModel.setFilterCaseSensitivity( Qt::CaseInsensitive ); -#if QT_VERSION >= 0x040700 setPlaceholderText( tr( "Dictionary search/filter (Ctrl+F)" ) ); -#endif m_focusAction.setShortcut( QKeySequence( "Ctrl+F" ) ); connect( &m_focusAction, SIGNAL( triggered() ), diff --git a/langcoder.cc b/langcoder.cc index 6d90f47a..90e00e90 100644 --- a/langcoder.cc +++ b/langcoder.cc @@ -353,11 +353,7 @@ bool LangCoder::isLanguageRTL( quint32 code ) GDLangCode &lc = LangCodes[ langCoder.codeMap[ code ] ]; if( lc.isRTL < 0 ) { -#if QT_VERSION >= 0x040700 lc.isRTL = ( int )( QLocale( lc.code ).textDirection() == Qt::RightToLeft ); -#else - lc.isRTL = 0; -#endif } return lc.isRTL != 0; } diff --git a/main.cc b/main.cc index 765a7561..26c38bff 100644 --- a/main.cc +++ b/main.cc @@ -310,9 +310,7 @@ int main( int argc, char ** argv ) app.setApplicationName( "GoldenDict" ); app.setOrganizationDomain( "http://goldendict.org/" ); -#if QT_VERSION >= 0x040600 app.setStyle(new GdAppStyle); -#endif #ifndef Q_OS_MAC app.setWindowIcon( QIcon( ":/icons/programicon.png" ) ); diff --git a/mainwindow.cc b/mainwindow.cc index d4f13df4..1d7c658e 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -655,9 +655,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ): connect( ui.tabWidget, SIGNAL( customContextMenuRequested(QPoint)) , this, SLOT( tabMenuRequested(QPoint)) ); -#if QT_VERSION >= 0x040500 ui.tabWidget->setTabsClosable( true ); -#endif connect( ui.quit, SIGNAL( triggered() ), this, SLOT( quitApp() ) ); diff --git a/translatebox.cc b/translatebox.cc index 587688f9..cc73762f 100644 --- a/translatebox.cc +++ b/translatebox.cc @@ -98,10 +98,7 @@ TranslateBox::TranslateBox(QWidget *parent) : QWidget(parent), setFocusProxy(translate_line); translate_line->setObjectName("translateLine"); -#if QT_VERSION >= 0x040700 translate_line->setPlaceholderText( tr( "Type a word or phrase to search dictionaries" ) ); -#endif - word_list->setTranslateLine(translate_line); // completer = new QCompleter(m_completionList->model(), this); diff --git a/xdxf.cc b/xdxf.cc index 192daeaf..e32caef2 100644 --- a/xdxf.cc +++ b/xdxf.cc @@ -831,11 +831,7 @@ namespace { /// Deal with Qt 4.5 incompatibility QString readElementText( QXmlStreamReader & stream ) { -#if QT_VERSION >= 0x040600 return stream.readElementText( QXmlStreamReader::SkipChildElements ); -#else - return stream.readElementText(); -#endif } }