From 618310f77235f4b6e7d1fc56e7f77f1437618d07 Mon Sep 17 00:00:00 2001 From: shenleban tongying Date: Wed, 6 Nov 2024 22:53:04 -0500 Subject: [PATCH] clean: just use `#pragma once` --- src/ankiconnector.hh | 5 +---- src/article_maker.hh | 6 +----- src/article_netmgr.hh | 4 +--- src/audiolink.hh | 5 +---- src/audiooutput.hh | 6 +----- src/audioplayerfactory.hh | 5 +---- src/audioplayerinterface.hh | 5 +---- src/common/base_type.hh | 4 +--- src/common/ex.hh | 5 +---- src/common/filetype.hh | 5 +---- src/common/folding.hh | 5 +---- src/common/gddebug.hh | 5 +---- src/common/globalbroadcaster.hh | 5 +---- src/common/globalregex.hh | 5 +---- src/common/htmlescape.hh | 5 +---- src/common/iconv.hh | 5 +---- src/common/sptr.hh | 4 +--- src/common/utf8.hh | 5 +---- src/common/utils.hh | 5 +---- src/common/wildcard.hh | 5 +---- src/common/wstring_qt.hh | 5 +---- src/config.hh | 5 +---- src/delegate.hh | 5 +---- src/dict/aard.hh | 5 +---- src/dict/belarusiantranslit.hh | 5 +---- src/dict/bgl.hh | 5 +---- src/dict/bgl_babylon.hh | 5 +---- src/dict/btreeidx.hh | 5 +---- src/dict/chinese.hh | 5 +---- src/dict/chunkedstorage.hh | 5 +---- src/dict/customtransliteration.hh | 4 +--- src/dict/dictdfiles.hh | 5 +---- src/dict/dictionary.hh | 5 +---- src/dict/dictserver.hh | 5 +---- src/dict/dsl.hh | 5 +---- src/dict/dsl_details.hh | 5 +---- src/dict/epwing.hh | 5 +---- src/dict/epwing_book.hh | 6 +----- src/dict/epwing_charmap.hh | 5 +---- src/dict/forvo.hh | 5 +---- src/dict/german.hh | 5 +---- src/dict/gls.hh | 5 +---- src/dict/greektranslit.hh | 5 +---- src/dict/hunspell.hh | 5 +---- src/dict/lingualibre.hh | 5 +---- src/dict/loaddictionaries.hh | 4 +--- src/dict/lsa.hh | 5 +---- src/dict/mdictparser.hh | 5 +---- src/dict/mdx.hh | 5 +---- src/dict/mediawiki.hh | 5 +---- src/dict/programs.hh | 5 +---- src/dict/romaji.hh | 5 +---- src/dict/russiantranslit.hh | 5 +---- src/dict/sdict.hh | 5 +---- src/dict/slob.hh | 5 +---- src/dict/sounddir.hh | 5 +---- src/dict/sources.hh | 5 +---- src/dict/stardict.hh | 5 +---- src/dict/transliteration.hh | 5 +---- src/dict/utils/decompress.hh | 5 +---- src/dict/utils/dictfile.hh | 5 +---- src/dict/utils/dictzip.hh | 5 +---- src/dict/utils/indexedzip.hh | 5 +---- src/dict/utils/ripemd.hh | 5 +---- src/dict/utils/splitfile.hh | 5 +---- src/dict/utils/ufile.hh | 5 +---- src/dict/utils/zipfile.hh | 5 +---- src/dict/website.hh | 5 +---- src/dict/xdxf.hh | 5 +---- src/dict/xdxf2html.hh | 5 +---- src/dict/zim.hh | 5 +---- src/dict/zipsounds.hh | 5 +---- src/dictionary_group.hh | 5 +---- src/externalaudioplayer.hh | 5 +---- src/externalviewer.hh | 5 +---- src/ffmpegaudio.hh | 5 +---- src/ffmpegaudioplayer.hh | 5 +---- src/ftshelpers.hh | 5 +---- src/fulltextsearch.hh | 5 +---- src/headwordsmodel.hh | 5 +---- src/history.hh | 5 +---- src/hotkeywrapper.hh | 5 +---- src/iframeschemehandler.hh | 5 +---- src/initializing.hh | 5 +---- src/instances.hh | 5 +---- src/keyboardstate.hh | 5 +---- src/langcoder.hh | 6 +----- src/language.hh | 5 +---- src/macos/macmouseover.hh | 19 ++++++++----------- src/multimediaaudioplayer.hh | 5 +---- src/pronounceengine.hh | 5 +---- src/resourceschemehandler.hh | 5 +---- src/termination.hh | 5 +---- src/tiff.hh | 6 +----- src/ui/about.hh | 5 +---- src/ui/article_inspect.hh | 5 +---- src/ui/articleview.hh | 5 +---- src/ui/articlewebpage.hh | 5 +---- src/ui/articlewebview.hh | 5 +---- src/ui/chineseconversion.hh | 5 +---- src/ui/dictheadwords.hh | 5 +---- src/ui/dictinfo.hh | 5 +---- src/ui/dictionarybar.hh | 5 +---- src/ui/dictspanewidget.hh | 5 +---- src/ui/editdictionaries.hh | 5 +---- src/ui/favoritespanewidget.hh | 5 +---- src/ui/ftssearchpanel.hh | 6 +----- src/ui/groupcombobox.hh | 5 +---- src/ui/groups.hh | 5 +---- src/ui/groups_widgets.hh | 5 +---- src/ui/historypanewidget.hh | 5 +---- src/ui/mainstatusbar.hh | 5 +---- src/ui/maintabwidget.hh | 5 +---- src/ui/mainwindow.hh | 5 +---- src/ui/mruqmenu.hh | 6 +----- src/ui/orderandprops.hh | 5 +---- src/ui/preferences.hh | 5 +---- src/ui/scanflag.hh | 5 +---- src/ui/scanpopup.hh | 5 +---- src/ui/searchpanel.hh | 6 +----- src/ui/searchpanewidget.hh | 5 +---- src/ui/stylescombobox.hh | 5 +---- src/ui/translatebox.hh | 5 +---- src/webmultimediadownload.hh | 5 +---- src/weburlrequestinterceptor.hh | 5 +---- src/windows/stub_msvc.h | 2 ++ src/wordfinder.hh | 5 +---- 127 files changed, 135 insertions(+), 514 deletions(-) diff --git a/src/ankiconnector.hh b/src/ankiconnector.hh index f5fae87d..e25d0d7c 100644 --- a/src/ankiconnector.hh +++ b/src/ankiconnector.hh @@ -1,5 +1,4 @@ -#ifndef ANKICONNECTOR_H -#define ANKICONNECTOR_H +#pragma once #include "config.hh" @@ -29,5 +28,3 @@ signals: private slots: void finishedSlot( QNetworkReply * reply ); }; - -#endif // ANKICONNECTOR_H diff --git a/src/article_maker.hh b/src/article_maker.hh index d2408861..a57065e7 100644 --- a/src/article_maker.hh +++ b/src/article_maker.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __ARTICLE_MAKER_HH_INCLUDED__ -#define __ARTICLE_MAKER_HH_INCLUDED__ +#pragma once #include #include @@ -158,6 +157,3 @@ private: int findEndOfCloseDiv( QString const &, int pos ); bool isCollapsable( Dictionary::DataRequest & req, QString const & dictId ); }; - - -#endif diff --git a/src/article_netmgr.hh b/src/article_netmgr.hh index aedfbc6c..d6932807 100644 --- a/src/article_netmgr.hh +++ b/src/article_netmgr.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __ARTICLE_NETMGR_HH_INCLUDED__ -#define __ARTICLE_NETMGR_HH_INCLUDED__ +#pragma once #include #include @@ -242,4 +241,3 @@ private: ArticleNetworkAccessManager & mManager; QNetworkAccessManager mgr; }; -#endif diff --git a/src/audiolink.hh b/src/audiolink.hh index 2d0e1bcc..12afb20d 100644 --- a/src/audiolink.hh +++ b/src/audiolink.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __AUDIOLINK_HH_INCLUDED__ -#define __AUDIOLINK_HH_INCLUDED__ +#pragma once #include @@ -15,5 +14,3 @@ /// The dictionary id is used to make active dictionary feature work. std::string addAudioLink( std::string const & url, std::string const & dictionaryId ); std::string addAudioLink( QString const & url, std::string const & dictionaryId ); - -#endif diff --git a/src/audiooutput.hh b/src/audiooutput.hh index 369f4615..445e5d5c 100644 --- a/src/audiooutput.hh +++ b/src/audiooutput.hh @@ -1,5 +1,4 @@ -#ifndef AUDIOOUTPUT_H -#define AUDIOOUTPUT_H +#pragma once #include #include @@ -22,6 +21,3 @@ private: Q_DISABLE_COPY( AudioOutput ) Q_DECLARE_PRIVATE( AudioOutput ) }; - - -#endif // AUDIOOUTPUT_H diff --git a/src/audioplayerfactory.hh b/src/audioplayerfactory.hh index 39abfcc2..54d6d59a 100644 --- a/src/audioplayerfactory.hh +++ b/src/audioplayerfactory.hh @@ -1,8 +1,7 @@ /* This file is (c) 2018 Igor Kushnir * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef AUDIOPLAYERFACTORY_HH_INCLUDED -#define AUDIOPLAYERFACTORY_HH_INCLUDED +#pragma once #include "audioplayerinterface.hh" #include "config.hh" @@ -33,5 +32,3 @@ private: QString audioPlaybackProgram; AudioPlayerPtr playerPtr; }; - -#endif // AUDIOPLAYERFACTORY_HH_INCLUDED diff --git a/src/audioplayerinterface.hh b/src/audioplayerinterface.hh index f297eb88..fbb758b8 100644 --- a/src/audioplayerinterface.hh +++ b/src/audioplayerinterface.hh @@ -1,8 +1,7 @@ /* This file is (c) 2018 Igor Kushnir * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef AUDIOPLAYERINTERFACE_HH_INCLUDED -#define AUDIOPLAYERINTERFACE_HH_INCLUDED +#pragma once #include #include @@ -27,5 +26,3 @@ signals: }; using AudioPlayerPtr = QScopedPointer< AudioPlayerInterface >; - -#endif // AUDIOPLAYERINTERFACE_HH_INCLUDED diff --git a/src/common/base_type.hh b/src/common/base_type.hh index 7df882e7..e8eebe41 100644 --- a/src/common/base_type.hh +++ b/src/common/base_type.hh @@ -1,7 +1,5 @@ -#ifndef BASE_TYPE_H -#define BASE_TYPE_H +#pragma once #include using Contexts = QMap< QString, QString >; -#endif // BASE_TYPE_H diff --git a/src/common/ex.hh b/src/common/ex.hh index 4bcbdc6e..233f8c40 100644 --- a/src/common/ex.hh +++ b/src/common/ex.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __EX_HH_INCLUDED__ -#define __EX_HH_INCLUDED__ +#pragma once #include @@ -47,5 +46,3 @@ } \ virtual ~exName() noexcept {} \ }; - -#endif diff --git a/src/common/filetype.hh b/src/common/filetype.hh index f63d9521..4f7b8271 100644 --- a/src/common/filetype.hh +++ b/src/common/filetype.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __FILETYPE_HH_INCLUDED__ -#define __FILETYPE_HH_INCLUDED__ +#pragma once #include @@ -31,5 +30,3 @@ bool isNameOfCSS( string const & ); bool isNameOfSvg( string const & name ); } // namespace Filetype - -#endif diff --git a/src/common/folding.hh b/src/common/folding.hh index 33f82079..9e9caaea 100644 --- a/src/common/folding.hh +++ b/src/common/folding.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __FOLDING_HH_INCLUDED__ -#define __FOLDING_HH_INCLUDED__ +#pragma once #include "wstring.hh" #include @@ -90,5 +89,3 @@ QString escapeWildcardSymbols( QString const & ); bool isCombiningMark( wchar ch ); } // namespace Folding - -#endif diff --git a/src/common/gddebug.hh b/src/common/gddebug.hh index 3194ea4d..b14d4d60 100644 --- a/src/common/gddebug.hh +++ b/src/common/gddebug.hh @@ -1,5 +1,4 @@ -#ifndef __GDDEBUG_HH_INCLUDED__ -#define __GDDEBUG_HH_INCLUDED__ +#pragma once #include @@ -28,5 +27,3 @@ void gdDebug( const char *, ... ) ; extern QFile * logFilePtr; - -#endif // __GDDEBUG_HH_INCLUDED__ diff --git a/src/common/globalbroadcaster.hh b/src/common/globalbroadcaster.hh index 744c03ee..c1d985d0 100644 --- a/src/common/globalbroadcaster.hh +++ b/src/common/globalbroadcaster.hh @@ -1,5 +1,4 @@ -#ifndef GLOBAL_GLOBALBROADCASTER_H -#define GLOBAL_GLOBALBROADCASTER_H +#pragma once #include #include @@ -47,5 +46,3 @@ signals: void indexingDictionary( QString ); }; - -#endif // GLOBAL_GLOBALBROADCASTER_H diff --git a/src/common/globalregex.hh b/src/common/globalregex.hh index b3e1a126..85fbc460 100644 --- a/src/common/globalregex.hh +++ b/src/common/globalregex.hh @@ -1,5 +1,4 @@ -#ifndef GLOBALREGEX_HH -#define GLOBALREGEX_HH +#pragma once #include @@ -78,5 +77,3 @@ const static QRegularExpression markSpace( R"([\p{M}\p{Z}\p{C}])", QRegularExpre const static QRegularExpression whiteSpace( "\\s+" ); } // namespace RX - -#endif // GLOBALREGEX_HH diff --git a/src/common/htmlescape.hh b/src/common/htmlescape.hh index e437cde1..5ce96ff1 100644 --- a/src/common/htmlescape.hh +++ b/src/common/htmlescape.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __HTMLESCAPE_HH_INCLUDED__ -#define __HTMLESCAPE_HH_INCLUDED__ +#pragma once #include #include @@ -33,5 +32,3 @@ QString fromHtmlEscaped( QString const & str ); string unescapeUtf8( string const & str, HtmlOption option = HtmlOption::Strip ); } // namespace Html - -#endif diff --git a/src/common/iconv.hh b/src/common/iconv.hh index ca35354a..3c72022b 100644 --- a/src/common/iconv.hh +++ b/src/common/iconv.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __ICONV_HH_INCLUDED__ -#define __ICONV_HH_INCLUDED__ +#pragma once #include @@ -47,5 +46,3 @@ public: // Copying/assigning isn't supported Q_DISABLE_COPY_MOVE( Iconv ); }; - -#endif diff --git a/src/common/sptr.hh b/src/common/sptr.hh index bb325e71..e500ba37 100644 --- a/src/common/sptr.hh +++ b/src/common/sptr.hh @@ -1,11 +1,9 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __SPTR_HH_INCLUDED__ -#define __SPTR_HH_INCLUDED__ +#pragma once #include // A shorthand for std::shared_ptr template< class T > using sptr = std::shared_ptr< T >; -#endif diff --git a/src/common/utf8.hh b/src/common/utf8.hh index 824f9971..4a0d2c88 100644 --- a/src/common/utf8.hh +++ b/src/common/utf8.hh @@ -1,7 +1,6 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __UTF8_HH_INCLUDED__ -#define __UTF8_HH_INCLUDED__ +#pragma once #include #include @@ -67,5 +66,3 @@ struct LineFeed LineFeed initLineFeed( Encoding e ); } // namespace Utf8 - -#endif diff --git a/src/common/utils.hh b/src/common/utils.hh index 76807341..6722ddbe 100644 --- a/src/common/utils.hh +++ b/src/common/utils.hh @@ -1,7 +1,6 @@ /* Thin wrappers for retaining compatibility for both Qt6.x and Qt5.x */ -#ifndef UTILS_HH -#define UTILS_HH +#pragma once #include #include @@ -350,5 +349,3 @@ QString escapeAmps( QString const & str ); QString unescapeAmps( QString const & str ); } // namespace Utils - -#endif // UTILS_HH diff --git a/src/common/wildcard.hh b/src/common/wildcard.hh index fb042071..c44bc159 100644 --- a/src/common/wildcard.hh +++ b/src/common/wildcard.hh @@ -1,8 +1,5 @@ -#ifndef __WILCARD_HH_INCLUDED__ -#define __WILCARD_HH_INCLUDED__ +#pragma once #include QString wildcardsToRegexp( const QString & wc_str ); - -#endif diff --git a/src/common/wstring_qt.hh b/src/common/wstring_qt.hh index 094ee239..e4aa074a 100644 --- a/src/common/wstring_qt.hh +++ b/src/common/wstring_qt.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __WSTRING_QT_HH_INCLUDED__ -#define __WSTRING_QT_HH_INCLUDED__ +#pragma once /// This file adds conversions between gd::wstring and QString. See wstring.hh /// for more details on gd::wstring. @@ -16,5 +15,3 @@ wstring removeTrailingZero( wstring const & v ); wstring removeTrailingZero( QString const & in ); wstring normalize( wstring const & ); } // namespace gd - -#endif diff --git a/src/config.hh b/src/config.hh index b47db3c8..9aea8f67 100644 --- a/src/config.hh +++ b/src/config.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __CONFIG_HH_INCLUDED__ -#define __CONFIG_HH_INCLUDED__ +#pragma once #include #include @@ -1028,5 +1027,3 @@ QString getStylesDir(); QString getCacheDir() noexcept; } // namespace Config - -#endif diff --git a/src/delegate.hh b/src/delegate.hh index 62b044ca..684ca78f 100644 --- a/src/delegate.hh +++ b/src/delegate.hh @@ -1,5 +1,4 @@ -#ifndef __DELEGATE_HH_INCLUDED__ -#define __DELEGATE_HH_INCLUDED__ +#pragma once #include #include @@ -13,5 +12,3 @@ public: private: QStyledItemDelegate * mainDelegate; }; - -#endif diff --git a/src/dict/aard.hh b/src/dict/aard.hh index a9583665..038bfae6 100644 --- a/src/dict/aard.hh +++ b/src/dict/aard.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __AARD_HH_INCLUDED__ -#define __AARD_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -18,5 +17,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f unsigned maxHeadwordsToExpand ); } // namespace Aard - -#endif diff --git a/src/dict/belarusiantranslit.hh b/src/dict/belarusiantranslit.hh index 4ea452db..43b06ce3 100644 --- a/src/dict/belarusiantranslit.hh +++ b/src/dict/belarusiantranslit.hh @@ -1,8 +1,7 @@ /* This file is (c) 2013 Maksim Tamkovicz * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __BELARUSIANTRANSLIT_HH_INCLUDED__ -#define __BELARUSIANTRANSLIT_HH_INCLUDED__ +#pragma once #include #include "dictionary.hh" @@ -12,5 +11,3 @@ namespace BelarusianTranslit { std::vector< sptr< Dictionary::Class > > makeDictionaries(); } - -#endif diff --git a/src/dict/bgl.hh b/src/dict/bgl.hh index de630d16..6cf8fa5c 100644 --- a/src/dict/bgl.hh +++ b/src/dict/bgl.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __BGL_HH_INCLUDED__ -#define __BGL_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -23,5 +22,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace Bgl - -#endif diff --git a/src/dict/bgl_babylon.hh b/src/dict/bgl_babylon.hh index 01e756b0..54bc3a79 100644 --- a/src/dict/bgl_babylon.hh +++ b/src/dict/bgl_babylon.hh @@ -18,8 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef BABYLON_H -#define BABYLON_H +#pragma once #include #include @@ -229,5 +228,3 @@ private: BGL_TARGET_CHARSET }; }; - -#endif // BABYLON_H diff --git a/src/dict/btreeidx.hh b/src/dict/btreeidx.hh index b029adcd..f42278a9 100644 --- a/src/dict/btreeidx.hh +++ b/src/dict/btreeidx.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __BTREEIDX_HH_INCLUDED__ -#define __BTREEIDX_HH_INCLUDED__ +#pragma once #include "dict/dictionary.hh" #include "dictfile.hh" @@ -270,5 +269,3 @@ struct IndexedWords: public map< string, vector< WordArticleLink > > IndexInfo buildIndex( IndexedWords const &, File::Index & file ); } // namespace BtreeIndexing - -#endif diff --git a/src/dict/chinese.hh b/src/dict/chinese.hh index cc3054de..4c4fcc64 100644 --- a/src/dict/chinese.hh +++ b/src/dict/chinese.hh @@ -1,8 +1,7 @@ /* This file is (c) 2015 Zhe Wang <0x1997@gmail.com> * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __CHINESE_HH_INCLUDED__ -#define __CHINESE_HH_INCLUDED__ +#pragma once #include #include "config.hh" @@ -13,5 +12,3 @@ namespace Chinese { std::vector< sptr< Dictionary::Class > > makeDictionaries( Config::Chinese const & ); } - -#endif diff --git a/src/dict/chunkedstorage.hh b/src/dict/chunkedstorage.hh index 7d231f2c..86c74ea5 100644 --- a/src/dict/chunkedstorage.hh +++ b/src/dict/chunkedstorage.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __CHUNKEDSTORAGE_HH_INCLUDED__ -#define __CHUNKEDSTORAGE_HH_INCLUDED__ +#pragma once #include "ex.hh" #include "dictfile.hh" @@ -86,5 +85,3 @@ public: }; } // namespace ChunkedStorage - -#endif diff --git a/src/dict/customtransliteration.hh b/src/dict/customtransliteration.hh index caaa9bb5..e09882c4 100644 --- a/src/dict/customtransliteration.hh +++ b/src/dict/customtransliteration.hh @@ -1,5 +1,4 @@ -#ifndef CUSTOMTRANSLITERATION_HH -#define CUSTOMTRANSLITERATION_HH +#pragma once #include @@ -23,4 +22,3 @@ private: std::vector< sptr< Dictionary::Class > > makeDictionaries( Config::CustomTrans const & ); } // namespace CustomTranslit -#endif // CUSTOMTRANSLITERATION_HH diff --git a/src/dict/dictdfiles.hh b/src/dict/dictdfiles.hh index 6c86cfae..91765338 100644 --- a/src/dict/dictdfiles.hh +++ b/src/dict/dictdfiles.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __DICTDFILES_HH_INCLUDED__ -#define __DICTDFILES_HH_INCLUDED__ +#pragma once #include "dict/dictionary.hh" @@ -16,5 +15,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace DictdFiles - -#endif diff --git a/src/dict/dictionary.hh b/src/dict/dictionary.hh index abc52f36..0d194838 100644 --- a/src/dict/dictionary.hh +++ b/src/dict/dictionary.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __DICTIONARY_HH_INCLUDED__ -#define __DICTIONARY_HH_INCLUDED__ +#pragma once #include #include @@ -584,5 +583,3 @@ QString generateRandomDictionaryId(); QMap< std::string, sptr< Dictionary::Class > > dictToMap( std::vector< sptr< Dictionary::Class > > const & dicts ); } // namespace Dictionary - -#endif diff --git a/src/dict/dictserver.hh b/src/dict/dictserver.hh index 3a69a10d..2076decc 100644 --- a/src/dict/dictserver.hh +++ b/src/dict/dictserver.hh @@ -1,5 +1,4 @@ -#ifndef __DICTSERVER_HH__INCLUDED__ -#define __DICTSERVER_HH__INCLUDED__ +#pragma once #include "dict/dictionary.hh" #include "config.hh" @@ -13,5 +12,3 @@ using std::string; vector< sptr< Dictionary::Class > > makeDictionaries( Config::DictServers const & servers ); } // namespace DictServer - -#endif // __DICTSERVER_HH__INCLUDED__ diff --git a/src/dict/dsl.hh b/src/dict/dsl.hh index 1360fcae..3e4b69ce 100644 --- a/src/dict/dsl.hh +++ b/src/dict/dsl.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __DSL_HH_INCLUDED__ -#define __DSL_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -18,5 +17,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f unsigned int maxHeadwordSize ); } // namespace Dsl - -#endif diff --git a/src/dict/dsl_details.hh b/src/dict/dsl_details.hh index a74cafdf..c0cb1fb5 100644 --- a/src/dict/dsl_details.hh +++ b/src/dict/dsl_details.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __DSL_DETAILS_HH_INCLUDED__ -#define __DSL_DETAILS_HH_INCLUDED__ +#pragma once #include #include @@ -223,5 +222,3 @@ quint32 dslLanguageToId( wstring const & name ); } // namespace Details } // namespace Dsl - -#endif diff --git a/src/dict/epwing.hh b/src/dict/epwing.hh index 8c9c6241..bc4890c9 100644 --- a/src/dict/epwing.hh +++ b/src/dict/epwing.hh @@ -1,5 +1,4 @@ -#ifndef __EPWING_HH__INCLUDED__ -#define __EPWING_HH__INCLUDED__ +#pragma once #include "dict/dictionary.hh" #include "epwing_book.hh" @@ -20,5 +19,3 @@ void addWordToChunks( Epwing::Book::EpwingHeadword & head, vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace Epwing - -#endif // __EPWING_HH__INCLUDED__ diff --git a/src/dict/epwing_book.hh b/src/dict/epwing_book.hh index ea2f39b6..8fd78a3b 100644 --- a/src/dict/epwing_book.hh +++ b/src/dict/epwing_book.hh @@ -1,5 +1,4 @@ -#ifndef __EPWING_BOOK_HH_INCLUDED__ -#define __EPWING_BOOK_HH_INCLUDED__ +#pragma once #include "dict/dictionary.hh" #include "ex.hh" @@ -270,6 +269,3 @@ struct EContainer } // namespace Book } // namespace Epwing - - -#endif // __EPWING_BOOK_HH_INCLUDED__ diff --git a/src/dict/epwing_charmap.hh b/src/dict/epwing_charmap.hh index 66e37ffd..26212084 100644 --- a/src/dict/epwing_charmap.hh +++ b/src/dict/epwing_charmap.hh @@ -1,5 +1,4 @@ -#ifndef __EPWING_CHARMAP_HH_INCLUDED_ -#define __EPWING_CHARMAP_HH_INCLUDED_ +#pragma once #include #include @@ -22,5 +21,3 @@ private: }; } // namespace Epwing - -#endif // __EPWING_CHARMAP_HH_INCLUDED_ diff --git a/src/dict/forvo.hh b/src/dict/forvo.hh index a6528441..2d584832 100644 --- a/src/dict/forvo.hh +++ b/src/dict/forvo.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __FORVO_HH_INCLUDED__ -#define __FORVO_HH_INCLUDED__ +#pragma once #include "dictionary.hh" #include "config.hh" @@ -15,5 +14,3 @@ std::vector< sptr< Dictionary::Class > > makeDictionaries( Dictionary::Initializing &, Config::Forvo const &, QNetworkAccessManager & ); } // namespace Forvo - -#endif diff --git a/src/dict/german.hh b/src/dict/german.hh index 46b80416..69bc7431 100644 --- a/src/dict/german.hh +++ b/src/dict/german.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef GERMAN_HH -#define GERMAN_HH +#pragma once #include "dictionary.hh" @@ -11,5 +10,3 @@ namespace GermanTranslit { sptr< Dictionary::Class > makeDictionary(); } - -#endif // GERMAN_HH diff --git a/src/dict/gls.hh b/src/dict/gls.hh index 26244ea9..e8ba2ac3 100644 --- a/src/dict/gls.hh +++ b/src/dict/gls.hh @@ -1,5 +1,4 @@ -#ifndef __GLS_HH_INCLUDED__ -#define __GLS_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -13,5 +12,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace Gls - -#endif // __GLS_HH_INCLUDED__ diff --git a/src/dict/greektranslit.hh b/src/dict/greektranslit.hh index b6fe3f39..83331146 100644 --- a/src/dict/greektranslit.hh +++ b/src/dict/greektranslit.hh @@ -1,8 +1,7 @@ /* This file is (c) 2010 Jennie Petoumenou * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef GREEKTRANSLIT_HH -#define GREEKTRANSLIT_HH +#pragma once #include "dictionary.hh" @@ -11,5 +10,3 @@ namespace GreekTranslit { sptr< Dictionary::Class > makeDictionary(); } - -#endif // GREEKTRANSLIT_HH diff --git a/src/dict/hunspell.hh b/src/dict/hunspell.hh index 5c8237c7..6be3cf1c 100644 --- a/src/dict/hunspell.hh +++ b/src/dict/hunspell.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __HUNSPELL_HH_INCLUDED__ -#define __HUNSPELL_HH_INCLUDED__ +#pragma once #ifdef _MSC_VER #define HUNSPELL_STATIC @@ -41,5 +40,3 @@ vector< DataFiles > findDataFiles( QString const & path ); vector< sptr< Dictionary::Class > > makeDictionaries( Config::Hunspell const & ); } // namespace HunspellMorpho - -#endif diff --git a/src/dict/lingualibre.hh b/src/dict/lingualibre.hh index 733d2108..ee78675a 100644 --- a/src/dict/lingualibre.hh +++ b/src/dict/lingualibre.hh @@ -1,5 +1,4 @@ -#ifndef GOLDENDICT_LINGUALIBRE_H -#define GOLDENDICT_LINGUALIBRE_H +#pragma once #include "dictionary.hh" #include "config.hh" @@ -11,5 +10,3 @@ std::vector< sptr< Dictionary::Class > > makeDictionaries( Dictionary::Initializing &, Config::Lingua const &, QNetworkAccessManager & ); } // namespace Lingua - -#endif //GOLDENDICT_LINGUALIBRE_H diff --git a/src/dict/loaddictionaries.hh b/src/dict/loaddictionaries.hh index ca060bb1..8768a61d 100644 --- a/src/dict/loaddictionaries.hh +++ b/src/dict/loaddictionaries.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __LOADDICTIONARIES_HH_INCLUDED__ -#define __LOADDICTIONARIES_HH_INCLUDED__ +#pragma once #include "initializing.hh" #include "config.hh" @@ -75,4 +74,3 @@ void loadDictionaries( QWidget * parent, /// Runs deferredInit() on all the given dictionaries. Useful when /// loadDictionaries() was previously called with doDeferredInit = false. void doDeferredInit( std::vector< sptr< Dictionary::Class > > & ); -#endif diff --git a/src/dict/lsa.hh b/src/dict/lsa.hh index cfece681..ff4f3d3a 100644 --- a/src/dict/lsa.hh +++ b/src/dict/lsa.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __L9SA_HH_INCLUDED__ -#define __L9SA_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -16,5 +15,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace Lsa - -#endif diff --git a/src/dict/mdictparser.hh b/src/dict/mdictparser.hh index 74dc4b9a..67153471 100644 --- a/src/dict/mdictparser.hh +++ b/src/dict/mdictparser.hh @@ -18,8 +18,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -#ifndef __MDICTPARSER_HH_INCLUDED__ -#define __MDICTPARSER_HH_INCLUDED__ +#pragma once #include #include @@ -215,5 +214,3 @@ protected: }; } // namespace Mdict - -#endif // __MDICTPARSER_HH_INCLUDED__ diff --git a/src/dict/mdx.hh b/src/dict/mdx.hh index f2d09c64..52b60d1c 100644 --- a/src/dict/mdx.hh +++ b/src/dict/mdx.hh @@ -1,8 +1,7 @@ /* This file is (c) 2013 Timon Wong * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __MDX_HH_INCLUDED__ -#define __MDX_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -15,5 +14,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace Mdx - -#endif // __MDX_HH_INCLUDED__ diff --git a/src/dict/mediawiki.hh b/src/dict/mediawiki.hh index d1008549..257ff92b 100644 --- a/src/dict/mediawiki.hh +++ b/src/dict/mediawiki.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __MEDIAWIKI_HH_INCLUDED__ -#define __MEDIAWIKI_HH_INCLUDED__ +#pragma once #include "dictionary.hh" #include "config.hh" @@ -18,5 +17,3 @@ makeDictionaries( Dictionary::Initializing &, Config::MediaWikis const & wikis, } // namespace MediaWiki - -#endif diff --git a/src/dict/programs.hh b/src/dict/programs.hh index 60e37baf..772cecf9 100644 --- a/src/dict/programs.hh +++ b/src/dict/programs.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __PROGRAMS_HH_INCLUDED__ -#define __PROGRAMS_HH_INCLUDED__ +#pragma once #include #include "dictionary.hh" @@ -79,5 +78,3 @@ private slots: }; } // namespace Programs - -#endif diff --git a/src/dict/romaji.hh b/src/dict/romaji.hh index 2de2f3cc..1469d088 100644 --- a/src/dict/romaji.hh +++ b/src/dict/romaji.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __ROMAJI_HH_INCLUDED__ -#define __ROMAJI_HH_INCLUDED__ +#pragma once #include "transliteration.hh" #include "config.hh" @@ -14,5 +13,3 @@ using std::vector; vector< sptr< Dictionary::Class > > makeDictionaries( Config::Romaji const & ); } // namespace Romaji - -#endif diff --git a/src/dict/russiantranslit.hh b/src/dict/russiantranslit.hh index b3cd93c3..4980bd21 100644 --- a/src/dict/russiantranslit.hh +++ b/src/dict/russiantranslit.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __RUSSIANTRANSLIT_HH_INCLUDED__ -#define __RUSSIANTRANSLIT_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -11,5 +10,3 @@ namespace RussianTranslit { sptr< Dictionary::Class > makeDictionary(); } - -#endif diff --git a/src/dict/sdict.hh b/src/dict/sdict.hh index a6b0a5ff..04cfc6d8 100644 --- a/src/dict/sdict.hh +++ b/src/dict/sdict.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __SDICT_HH_INCLUDED__ -#define __SDICT_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -16,5 +15,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace Sdict - -#endif diff --git a/src/dict/slob.hh b/src/dict/slob.hh index 0513e015..4691659b 100644 --- a/src/dict/slob.hh +++ b/src/dict/slob.hh @@ -1,5 +1,4 @@ -#ifndef __SLOB_HH_INCLUDED__ -#define __SLOB_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -15,5 +14,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f unsigned maxHeadwordsToExpand ); } // namespace Slob - -#endif // __SLOB_HH_INCLUDED__ diff --git a/src/dict/sounddir.hh b/src/dict/sounddir.hh index 7e2ee63e..2c5a5ab2 100644 --- a/src/dict/sounddir.hh +++ b/src/dict/sounddir.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __SOUNDDIR_HH_INCLUDED__ -#define __SOUNDDIR_HH_INCLUDED__ +#pragma once #include "dictionary.hh" #include "config.hh" @@ -17,5 +16,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( Config::SoundDirs const &, string const & indicesDir, Dictionary::Initializing & ); } // namespace SoundDir - -#endif diff --git a/src/dict/sources.hh b/src/dict/sources.hh index 0754f7aa..e7232750 100644 --- a/src/dict/sources.hh +++ b/src/dict/sources.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __SOURCES_HH_INCLUDED__ -#define __SOURCES_HH_INCLUDED__ +#pragma once #include "ui_sources.h" #include "config.hh" @@ -360,5 +359,3 @@ private slots: void on_rescan_clicked(); }; - -#endif diff --git a/src/dict/stardict.hh b/src/dict/stardict.hh index e4cd3a5f..e271cca9 100644 --- a/src/dict/stardict.hh +++ b/src/dict/stardict.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __STARTDICT_HH_INCLUDED__ -#define __STARTDICT_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -18,5 +17,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f unsigned maxHeadwordsToExpand ); } // namespace Stardict - -#endif diff --git a/src/dict/transliteration.hh b/src/dict/transliteration.hh index 3a66cb48..a5623038 100644 --- a/src/dict/transliteration.hh +++ b/src/dict/transliteration.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __TRANSLITERATION_HH_INCLUDED__ -#define __TRANSLITERATION_HH_INCLUDED__ +#pragma once #include "dictionary.hh" #include @@ -84,5 +83,3 @@ public: }; } // namespace Transliteration - -#endif diff --git a/src/dict/utils/decompress.hh b/src/dict/utils/decompress.hh index c5352415..3d24e8d0 100644 --- a/src/dict/utils/decompress.hh +++ b/src/dict/utils/decompress.hh @@ -1,5 +1,4 @@ -#ifndef __DECOMPRESS_HH_INCLUDED__ -#define __DECOMPRESS_HH_INCLUDED__ +#pragma once #include #include @@ -13,5 +12,3 @@ string decompressZlib( const char * bufptr, unsigned length ); string decompressBzip2( const char * bufptr, unsigned length ); string decompressLzma2( const char * bufptr, unsigned length, bool raw_decoder = false ); - -#endif // DECOMPRESS_HH diff --git a/src/dict/utils/dictfile.hh b/src/dict/utils/dictfile.hh index 0cfc0017..809cd402 100644 --- a/src/dict/utils/dictfile.hh +++ b/src/dict/utils/dictfile.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef GOLDENDICT_FILE_HH -#define GOLDENDICT_FILE_HH +#pragma once #include "ex.hh" @@ -125,5 +124,3 @@ private: }; } // namespace File - -#endif diff --git a/src/dict/utils/dictzip.hh b/src/dict/utils/dictzip.hh index f9838168..7c9a6f22 100644 --- a/src/dict/utils/dictzip.hh +++ b/src/dict/utils/dictzip.hh @@ -21,8 +21,7 @@ * 51 Franklin Street, Suite 500, Boston, MA 02110, USA. */ -#ifndef _DICTZIP_H_ -#define _DICTZIP_H_ +#pragma once #include #include @@ -112,5 +111,3 @@ extern int mmap_mode; #ifdef __cplusplus } /* end extern "C" */ #endif - -#endif /* _DICTZIP_H_ */ diff --git a/src/dict/utils/indexedzip.hh b/src/dict/utils/indexedzip.hh index 20466720..750f2b15 100644 --- a/src/dict/utils/indexedzip.hh +++ b/src/dict/utils/indexedzip.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __INDEXEDZIP_HH_INCLUDED__ -#define __INDEXEDZIP_HH_INCLUDED__ +#pragma once #include "btreeidx.hh" #include @@ -48,5 +47,3 @@ public: /// Index compressed files in zip file bool indexFile( BtreeIndexing::IndexedWords & zipFileNames, quint32 * filesCount = 0 ); }; - -#endif diff --git a/src/dict/utils/ripemd.hh b/src/dict/utils/ripemd.hh index 2863a021..21bc9508 100644 --- a/src/dict/utils/ripemd.hh +++ b/src/dict/utils/ripemd.hh @@ -16,8 +16,7 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -#ifndef __RIPEMD_HH_INCLUDED__ -#define __RIPEMD_HH_INCLUDED__ +#pragma once #include #include @@ -42,5 +41,3 @@ private: void transform( const uchar buffer[ 64 ] ); }; - -#endif // __RIPEMD_HH_INCLUDED__ diff --git a/src/dict/utils/splitfile.hh b/src/dict/utils/splitfile.hh index 63f1b08b..9ac2457c 100644 --- a/src/dict/utils/splitfile.hh +++ b/src/dict/utils/splitfile.hh @@ -1,5 +1,4 @@ -#ifndef __SPLITFILE_HH_INCLUDED__ -#define __SPLITFILE_HH_INCLUDED__ +#pragma once #include #include @@ -51,5 +50,3 @@ public: }; } // namespace SplitFile - -#endif // __SPLITFILE_HH_INCLUDED__ diff --git a/src/dict/utils/ufile.hh b/src/dict/utils/ufile.hh index 4435e3f4..0d29b5f6 100644 --- a/src/dict/utils/ufile.hh +++ b/src/dict/utils/ufile.hh @@ -1,5 +1,4 @@ -#ifndef UFILE_HH_INCLUDED -#define UFILE_HH_INCLUDED +#pragma once // Don't use this thing. // Use QFile instead. @@ -29,5 +28,3 @@ gzFile gd_gzopen( const char * filename ); #define gd_fopen fopen #define gd_gzopen( filename ) gzopen( filename, "rb" ) #endif - -#endif // UFILE_HH diff --git a/src/dict/utils/zipfile.hh b/src/dict/utils/zipfile.hh index debf16ec..ed2625a4 100644 --- a/src/dict/utils/zipfile.hh +++ b/src/dict/utils/zipfile.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __ZIPFILE_HH_INCLUDED__ -#define __ZIPFILE_HH_INCLUDED__ +#pragma once #include #include @@ -72,5 +71,3 @@ bool readNextEntry( SplitZipFile &, CentralDirEntry & ); bool readLocalHeader( SplitZipFile &, LocalFileHeader & ); } // namespace ZipFile - -#endif diff --git a/src/dict/website.hh b/src/dict/website.hh index f1fb9658..f19c8a80 100644 --- a/src/dict/website.hh +++ b/src/dict/website.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __WEBSITE_HH_INCLUDED__ -#define __WEBSITE_HH_INCLUDED__ +#pragma once #include "dictionary.hh" #include "config.hh" @@ -17,5 +16,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( Config::WebSites const &, } // namespace WebSite - -#endif diff --git a/src/dict/xdxf.hh b/src/dict/xdxf.hh index bab8336f..b6aeee6a 100644 --- a/src/dict/xdxf.hh +++ b/src/dict/xdxf.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2009 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __XDXF_HH_INCLUDED__ -#define __XDXF_HH_INCLUDED__ +#pragma once #include "dictionary.hh" @@ -18,5 +17,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace Xdxf - -#endif diff --git a/src/dict/xdxf2html.hh b/src/dict/xdxf2html.hh index 942eafba..c2d3d903 100644 --- a/src/dict/xdxf2html.hh +++ b/src/dict/xdxf2html.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __XDXF2HTML_HH_INCLUDED__ -#define __XDXF2HTML_HH_INCLUDED__ +#pragma once #include #include @@ -32,5 +31,3 @@ string convert( string const &, QString * headword = 0 ); } // namespace Xdxf2Html - -#endif diff --git a/src/dict/zim.hh b/src/dict/zim.hh index 0bd86c2f..04f4fd23 100644 --- a/src/dict/zim.hh +++ b/src/dict/zim.hh @@ -1,5 +1,4 @@ -#ifndef __ZIM_HH_INCLUDED__ -#define __ZIM_HH_INCLUDED__ +#pragma once #ifdef MAKE_ZIM_SUPPORT @@ -19,5 +18,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f } // namespace Zim #endif - -#endif diff --git a/src/dict/zipsounds.hh b/src/dict/zipsounds.hh index a0b7c5c8..c101fb64 100644 --- a/src/dict/zipsounds.hh +++ b/src/dict/zipsounds.hh @@ -1,7 +1,6 @@ /* This file is part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef ZIPSOUNDS_HH -#define ZIPSOUNDS_HH +#pragma once #include "dictionary.hh" @@ -15,5 +14,3 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & fileNames, string const & indicesDir, Dictionary::Initializing & ); } // namespace ZipSounds - -#endif // ZIPSOUNDS_HH diff --git a/src/dictionary_group.hh b/src/dictionary_group.hh index b1d95ca1..2396e520 100644 --- a/src/dictionary_group.hh +++ b/src/dictionary_group.hh @@ -1,7 +1,6 @@ /* Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef DICTIONARYGROUP_HH_INCLUDED -#define DICTIONARYGROUP_HH_INCLUDED +#pragma once #include "sptr.hh" #include "dict/dictionary.hh" @@ -30,5 +29,3 @@ private: std::vector< sptr< Dictionary::Class > > const & allDictionaries; Instances::Groups const & groups; }; - -#endif // DICTIONARYGROUP_HH_INCLUDED diff --git a/src/externalaudioplayer.hh b/src/externalaudioplayer.hh index 02cb5214..767d229b 100644 --- a/src/externalaudioplayer.hh +++ b/src/externalaudioplayer.hh @@ -1,8 +1,7 @@ /* This file is (c) 2018 Igor Kushnir * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef EXTERNALAUDIOPLAYER_HH_INCLUDED -#define EXTERNALAUDIOPLAYER_HH_INCLUDED +#pragma once #include "audioplayerinterface.hh" #include @@ -44,5 +43,3 @@ private: // deleteLater() is safer because viewer actively participates in the QEventLoop. std::unique_ptr< ExternalViewer, QObjectDeleteLater > viewer; }; - -#endif // EXTERNALAUDIOPLAYER_HH_INCLUDED diff --git a/src/externalviewer.hh b/src/externalviewer.hh index 55188a29..395dab3b 100644 --- a/src/externalviewer.hh +++ b/src/externalviewer.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __EXTERNALVIEWER_HH_INCLUDED__ -#define __EXTERNALVIEWER_HH_INCLUDED__ +#pragma once #include #include @@ -44,5 +43,3 @@ public: /// Call this function instead of simply deleting viewer to prevent the /// "QProcess: Destroyed while process X is still running." warning in log. void stopAndDestroySynchronously( ExternalViewer * viewer ); - -#endif diff --git a/src/ffmpegaudio.hh b/src/ffmpegaudio.hh index 9e53b855..18e45275 100644 --- a/src/ffmpegaudio.hh +++ b/src/ffmpegaudio.hh @@ -1,5 +1,4 @@ -#ifndef __FFMPEGAUDIO_HH_INCLUDED__ -#define __FFMPEGAUDIO_HH_INCLUDED__ +#pragma once #ifdef MAKE_FFMPEG_PLAYER #include "audiooutput.hh" @@ -106,5 +105,3 @@ signals: } // namespace Ffmpeg #endif // MAKE_FFMPEG_PLAYER - -#endif // __FFMPEGAUDIO_HH_INCLUDED__ diff --git a/src/ffmpegaudioplayer.hh b/src/ffmpegaudioplayer.hh index 8ceb7c8c..6d71b0d8 100644 --- a/src/ffmpegaudioplayer.hh +++ b/src/ffmpegaudioplayer.hh @@ -1,8 +1,7 @@ /* This file is (c) 2018 Igor Kushnir * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef FFMPEGAUDIOPLAYER_HH_INCLUDED -#define FFMPEGAUDIOPLAYER_HH_INCLUDED +#pragma once #include "audioplayerinterface.hh" #include "ffmpegaudio.hh" @@ -41,5 +40,3 @@ public: } // namespace Ffmpeg #endif // MAKE_FFMPEG_PLAYER - -#endif // FFMPEGAUDIOPLAYER_HH_INCLUDED diff --git a/src/ftshelpers.hh b/src/ftshelpers.hh index cca71938..9172f485 100644 --- a/src/ftshelpers.hh +++ b/src/ftshelpers.hh @@ -1,5 +1,4 @@ -#ifndef __FTSHELPERS_HH_INCLUDED__ -#define __FTSHELPERS_HH_INCLUDED__ +#pragma once #include #include @@ -71,5 +70,3 @@ public: }; } // namespace FtsHelpers - -#endif // __FTSHELPERS_HH_INCLUDED__ diff --git a/src/fulltextsearch.hh b/src/fulltextsearch.hh index 1662f207..d4a63db8 100644 --- a/src/fulltextsearch.hh +++ b/src/fulltextsearch.hh @@ -1,5 +1,4 @@ -#ifndef __FULLTEXTSEARCH_HH_INCLUDED__ -#define __FULLTEXTSEARCH_HH_INCLUDED__ +#pragma once #include #include @@ -261,5 +260,3 @@ signals: } // namespace FTS - -#endif // __FULLTEXTSEARCH_HH_INCLUDED__ diff --git a/src/headwordsmodel.hh b/src/headwordsmodel.hh index d68df718..5a0857b8 100644 --- a/src/headwordsmodel.hh +++ b/src/headwordsmodel.hh @@ -1,5 +1,4 @@ -#ifndef HEADWORDSMODEL_H -#define HEADWORDSMODEL_H +#pragma once #include "dict/dictionary.hh" @@ -53,5 +52,3 @@ private: QMutex lock; std::list< sptr< Dictionary::WordSearchRequest > > queuedRequests; }; - -#endif // HEADWORDSMODEL_H diff --git a/src/history.hh b/src/history.hh index e2dfda33..f23dae18 100644 --- a/src/history.hh +++ b/src/history.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __HISTORY_HH_INCLUDED__ -#define __HISTORY_HH_INCLUDED__ +#pragma once #include #include @@ -114,5 +113,3 @@ private: protected: virtual void timerEvent( QTimerEvent * ); }; - -#endif diff --git a/src/hotkeywrapper.hh b/src/hotkeywrapper.hh index 3f9b2426..27e3f47c 100644 --- a/src/hotkeywrapper.hh +++ b/src/hotkeywrapper.hh @@ -1,5 +1,4 @@ -#ifndef HOTKEYWRAPPER_H -#define HOTKEYWRAPPER_H +#pragma once #include #include @@ -221,5 +220,3 @@ protected: }; ////////////////////////////////////////////////////////////////////////// - -#endif // HOTKEYWRAPPER_H diff --git a/src/iframeschemehandler.hh b/src/iframeschemehandler.hh index 700de6ae..fd8c7836 100644 --- a/src/iframeschemehandler.hh +++ b/src/iframeschemehandler.hh @@ -1,5 +1,4 @@ -#ifndef IFRAMESCHEMEHANDLER_H -#define IFRAMESCHEMEHANDLER_H +#pragma once #include "article_netmgr.hh" @@ -16,5 +15,3 @@ protected: private: QNetworkAccessManager mgr; }; - -#endif // IFRAMESCHEMEHANDLER_H diff --git a/src/initializing.hh b/src/initializing.hh index 7f4104c4..3429b263 100644 --- a/src/initializing.hh +++ b/src/initializing.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __INITIALIZING_HH_INCLUDED__ -#define __INITIALIZING_HH_INCLUDED__ +#pragma once #include "ui_initializing.h" @@ -26,5 +25,3 @@ private: Ui::Initializing ui; }; - -#endif diff --git a/src/instances.hh b/src/instances.hh index 6718ac0a..f9e9634a 100644 --- a/src/instances.hh +++ b/src/instances.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __INSTANCES_HH_INCLUDED__ -#define __INSTANCES_HH_INCLUDED__ +#pragma once #include "config.hh" #include "dict/dictionary.hh" @@ -79,5 +78,3 @@ void updateNames( Config::Class &, vector< sptr< Dictionary::Class > > const & a QIcon iconFromData( QByteArray const & ); } // namespace Instances - -#endif diff --git a/src/keyboardstate.hh b/src/keyboardstate.hh index 09a19917..7c12de5a 100644 --- a/src/keyboardstate.hh +++ b/src/keyboardstate.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __KEYBOARDSTATE_HH_INCLUDED__ -#define __KEYBOARDSTATE_HH_INCLUDED__ +#pragma once /// Since Qt doesn't provide a way to test for keyboard modifiers state /// when the app isn't in focus, we have to implement this separately for @@ -22,5 +21,3 @@ public: /// right now. bool static checkModifiersPressed( int mask ); }; - -#endif diff --git a/src/langcoder.hh b/src/langcoder.hh index e4aa53c7..647730f8 100644 --- a/src/langcoder.hh +++ b/src/langcoder.hh @@ -1,5 +1,4 @@ -#ifndef LANGCODER_H -#define LANGCODER_H +#pragma once #include #include @@ -59,6 +58,3 @@ private: /////////////////////////////////////////////////////////////////////////////// #define LangCodeRole Qt::UserRole - - -#endif // LANGCODER_H diff --git a/src/language.hh b/src/language.hh index bb1f7e42..01e974bb 100644 --- a/src/language.hh +++ b/src/language.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __LANGUAGE_HH_INCLUDED__ -#define __LANGUAGE_HH_INCLUDED__ +#pragma once #include #include "wstring_qt.hh" @@ -50,5 +49,3 @@ struct BabylonLang BabylonLang getBabylonLangByIndex( int index ); quint32 findBlgLangIDByEnglishName( gd::wstring const & lang ); } // namespace Language - -#endif diff --git a/src/macos/macmouseover.hh b/src/macos/macmouseover.hh index e1bbe7dc..57479579 100644 --- a/src/macos/macmouseover.hh +++ b/src/macos/macmouseover.hh @@ -1,15 +1,14 @@ #ifdef __APPLE__ - #ifndef __MACMOUSEOVER_HH_INCLUDED__ - #define __MACMOUSEOVER_HH_INCLUDED__ + #pragma once - #include - #include - #include - #include "config.hh" - #include "keyboardstate.hh" - #include - #include + #include + #include + #include + #include "config.hh" + #include "keyboardstate.hh" + #include + #include /// This is a mouseover feature interface, where you can point your mouse at /// any word in any window and wait a little, and it would provide that word @@ -66,6 +65,4 @@ private: bool mouseOverEnabled; }; - #endif - #endif diff --git a/src/multimediaaudioplayer.hh b/src/multimediaaudioplayer.hh index 19d83404..44b354a8 100644 --- a/src/multimediaaudioplayer.hh +++ b/src/multimediaaudioplayer.hh @@ -1,8 +1,7 @@ /* This file is (c) 2018 Igor Kushnir * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef MULTIMEDIAAUDIOPLAYER_HH_INCLUDED -#define MULTIMEDIAAUDIOPLAYER_HH_INCLUDED +#pragma once #ifdef MAKE_QTMULTIMEDIA_PLAYER @@ -44,5 +43,3 @@ private: }; #endif // MAKE_QTMULTIMEDIA_PLAYER - -#endif // MULTIMEDIAAUDIOPLAYER_HH_INCLUDED diff --git a/src/pronounceengine.hh b/src/pronounceengine.hh index 4a807469..2b28b34d 100644 --- a/src/pronounceengine.hh +++ b/src/pronounceengine.hh @@ -1,5 +1,4 @@ -#ifndef PRONOUNCEENGINE_HH -#define PRONOUNCEENGINE_HH +#pragma once #include #include @@ -27,5 +26,3 @@ public: signals: void emitAudio( QString audioLink ); }; - -#endif // PRONOUNCEENGINE_HH diff --git a/src/resourceschemehandler.hh b/src/resourceschemehandler.hh index 3df002ca..660fcb95 100644 --- a/src/resourceschemehandler.hh +++ b/src/resourceschemehandler.hh @@ -1,5 +1,4 @@ -#ifndef RESOURCESCHEMEHANDLER_H -#define RESOURCESCHEMEHANDLER_H +#pragma once #include "article_netmgr.hh" @@ -18,5 +17,3 @@ private: ArticleNetworkAccessManager & mManager; QMimeDatabase db; }; - -#endif // RESOURCESCHEMEHANDLER_H diff --git a/src/termination.hh b/src/termination.hh index 3d63dbb6..04e549d9 100644 --- a/src/termination.hh +++ b/src/termination.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef TERMINATION_HH -#define TERMINATION_HH +#pragma once #include @@ -11,5 +10,3 @@ extern QFile * logFilePtr; // Installs the termination handler which attempts to pop Qt's dialog showing // the exception and backtrace, and then aborts. void installTerminationHandler(); - -#endif // TERMINATION_HH diff --git a/src/tiff.hh b/src/tiff.hh index 7e70426b..6b4274e3 100644 --- a/src/tiff.hh +++ b/src/tiff.hh @@ -1,5 +1,4 @@ -#ifndef __TIFF_HH_INCLUDED__ -#define __TIFF_HH_INCLUDED__ +#pragma once #include #include @@ -8,6 +7,3 @@ namespace GdTiff { void tiff2img( std::vector< char > & data, const char * format = "webp" ); } - - -#endif // TIFF_HH diff --git a/src/ui/about.hh b/src/ui/about.hh index 955c080e..f101bfc5 100644 --- a/src/ui/about.hh +++ b/src/ui/about.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef ABOUT_HH -#define ABOUT_HH +#pragma once #include "ui_about.h" #include "sptr.hh" @@ -21,5 +20,3 @@ private: Ui::About ui; }; - -#endif // ABOUT_HH diff --git a/src/ui/article_inspect.hh b/src/ui/article_inspect.hh index 29fc523a..26aa6b9d 100644 --- a/src/ui/article_inspect.hh +++ b/src/ui/article_inspect.hh @@ -1,5 +1,4 @@ -#ifndef ARTICLE_INSPECT_H -#define ARTICLE_INSPECT_H +#pragma once #include #include @@ -21,5 +20,3 @@ private: virtual void closeEvent( QCloseEvent * ); }; - -#endif // ARTICLE_INSPECT_H diff --git a/src/ui/articleview.hh b/src/ui/articleview.hh index bac6fda4..5500fc34 100644 --- a/src/ui/articleview.hh +++ b/src/ui/articleview.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef GOLDENDICT_ARTICLEVIEW_H -#define GOLDENDICT_ARTICLEVIEW_H +#pragma once #include #include @@ -453,5 +452,3 @@ public slots: Q_INVOKABLE void linkClickedInHtml( QUrl const & ); Q_INVOKABLE void collapseInHtml( QString const & dictId, bool on = true ) const; }; - -#endif diff --git a/src/ui/articlewebpage.hh b/src/ui/articlewebpage.hh index 603b45e6..39baf1b6 100644 --- a/src/ui/articlewebpage.hh +++ b/src/ui/articlewebpage.hh @@ -1,5 +1,4 @@ -#ifndef ARTICLEWEBPAGE_H -#define ARTICLEWEBPAGE_H +#pragma once #include @@ -24,5 +23,3 @@ protected: private: LastReqInfo lastReq; }; - -#endif // ARTICLEWEBPAGE_H diff --git a/src/ui/articlewebview.hh b/src/ui/articlewebview.hh index f60296d1..7629c876 100644 --- a/src/ui/articlewebview.hh +++ b/src/ui/articlewebview.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __ARTICLEWEBVIEW_HH_INCLUDED__ -#define __ARTICLEWEBVIEW_HH_INCLUDED__ +#pragma once #include "config.hh" #include @@ -75,5 +74,3 @@ public slots: //receive signal ,a link has been clicked. void linkClickedInHtml( QUrl const & url ); }; - -#endif diff --git a/src/ui/chineseconversion.hh b/src/ui/chineseconversion.hh index 00541067..83fffbf3 100644 --- a/src/ui/chineseconversion.hh +++ b/src/ui/chineseconversion.hh @@ -1,8 +1,7 @@ /* This file is (c) 2015 Zhe Wang <0x1997@gmail.com> * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __CHINESE_CONVERSION_HH_INCLUDED__ -#define __CHINESE_CONVERSION_HH_INCLUDED__ +#pragma once #include #include "config.hh" @@ -24,5 +23,3 @@ public: private: Ui::ChineseConversion * ui; }; - -#endif // __CHINESE_CONVERSION_HH_INCLUDED__ diff --git a/src/ui/dictheadwords.hh b/src/ui/dictheadwords.hh index 51dc3c83..724ff96d 100644 --- a/src/ui/dictheadwords.hh +++ b/src/ui/dictheadwords.hh @@ -1,5 +1,4 @@ -#ifndef __DICTHEADWORDS_H_INCLUDED__ -#define __DICTHEADWORDS_H_INCLUDED__ +#pragma once #include #include @@ -64,5 +63,3 @@ signals: void headwordSelected( QString const &, QString const & ); void closeDialog(); }; - -#endif // __DICTHEADWORDS_H_INCLUDED__ diff --git a/src/ui/dictinfo.hh b/src/ui/dictinfo.hh index 13a7e205..9f9e0b56 100644 --- a/src/ui/dictinfo.hh +++ b/src/ui/dictinfo.hh @@ -1,5 +1,4 @@ -#ifndef DICTINFO_HH -#define DICTINFO_HH +#pragma once #include #include "ui_dictinfo.h" @@ -32,5 +31,3 @@ private slots: void on_headwordsButton_clicked(); void on_openIndexFolder_clicked(); }; - -#endif // DICTINFO_HH diff --git a/src/ui/dictionarybar.hh b/src/ui/dictionarybar.hh index 9f38f942..3b35fcff 100644 --- a/src/ui/dictionarybar.hh +++ b/src/ui/dictionarybar.hh @@ -1,5 +1,4 @@ -#ifndef __DICTIONARYBAR_HH_INCLUDED__ -#define __DICTIONARYBAR_HH_INCLUDED__ +#pragma once #include #include @@ -91,5 +90,3 @@ public slots: void dictsPaneClicked( QString const & ); }; - -#endif diff --git a/src/ui/dictspanewidget.hh b/src/ui/dictspanewidget.hh index bebde145..da18c431 100644 --- a/src/ui/dictspanewidget.hh +++ b/src/ui/dictspanewidget.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __DICTSPANEWIDGET_HH_INCLUDED__ -#define __DICTSPANEWIDGET_HH_INCLUDED__ +#pragma once #include #include @@ -24,5 +23,3 @@ public: return QSize( 204, 204 ); } }; - -#endif diff --git a/src/ui/editdictionaries.hh b/src/ui/editdictionaries.hh index 79c93dd5..14c48a83 100644 --- a/src/ui/editdictionaries.hh +++ b/src/ui/editdictionaries.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __EDITDICTIONARIES_HH_INCLUDED__ -#define __EDITDICTIONARIES_HH_INCLUDED__ +#pragma once #include "config.hh" #include "dict/dictionary.hh" @@ -93,5 +92,3 @@ private: QAction helpAction; }; - -#endif diff --git a/src/ui/favoritespanewidget.hh b/src/ui/favoritespanewidget.hh index ce55ec5c..336d6943 100644 --- a/src/ui/favoritespanewidget.hh +++ b/src/ui/favoritespanewidget.hh @@ -1,8 +1,7 @@ /* This file is (c) 2017 Abs62 * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __FAVORITIESPANEWIDGET_HH__INCLUDED__ -#define __FAVORITIESPANEWIDGET_HH__INCLUDED__ +#pragma once #include #include @@ -310,5 +309,3 @@ private: QStringList mimeFormats; QModelIndexList indexes; }; - -#endif // __FAVORITIESPANEWIDGET_HH__INCLUDED__ diff --git a/src/ui/ftssearchpanel.hh b/src/ui/ftssearchpanel.hh index 0339e5f2..9436493f 100644 --- a/src/ui/ftssearchpanel.hh +++ b/src/ui/ftssearchpanel.hh @@ -1,5 +1,4 @@ -#ifndef GOLDENDICT_FTSSEARCHPANEL_H -#define GOLDENDICT_FTSSEARCHPANEL_H +#pragma once #include #include @@ -15,6 +14,3 @@ public: QPushButton * previous; QPushButton * next; }; - - -#endif //GOLDENDICT_FTSSEARCHPANEL_H diff --git a/src/ui/groupcombobox.hh b/src/ui/groupcombobox.hh index 2ef672b6..2a2de608 100644 --- a/src/ui/groupcombobox.hh +++ b/src/ui/groupcombobox.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __GROUPCOMBOBOX_HH_INCLUDED__ -#define __GROUPCOMBOBOX_HH_INCLUDED__ +#pragma once #include #include @@ -54,5 +53,3 @@ private: QAction selectNextAction, selectPreviousAction; QMap< int, int > shortcuts; }; - -#endif diff --git a/src/ui/groups.hh b/src/ui/groups.hh index 8366f1e2..b6bbac08 100644 --- a/src/ui/groups.hh +++ b/src/ui/groups.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __GROUPS_HH_INCLUDED__ -#define __GROUPS_HH_INCLUDED__ +#pragma once #include "ui_groups.h" #include "config.hh" @@ -62,5 +61,3 @@ private slots: signals: void showDictionaryInfo( QString const & id ); }; - -#endif diff --git a/src/ui/groups_widgets.hh b/src/ui/groups_widgets.hh index d41c6c59..950f1ca4 100644 --- a/src/ui/groups_widgets.hh +++ b/src/ui/groups_widgets.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __GROUPS_WIDGETS_HH_INCLUDED__ -#define __GROUPS_WIDGETS_HH_INCLUDED__ +#pragma once // Various custom widgets used in the Groups dialog @@ -262,5 +261,3 @@ private slots: signals: void filterChanged( QString const & filter ); }; - -#endif diff --git a/src/ui/historypanewidget.hh b/src/ui/historypanewidget.hh index 722dc1df..7337a09a 100644 --- a/src/ui/historypanewidget.hh +++ b/src/ui/historypanewidget.hh @@ -1,8 +1,7 @@ /* This file is (c) 2013 Tvangeste * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __HISTORYPANEWIDGET_HH_INCLUDED__ -#define __HISTORYPANEWIDGET_HH_INCLUDED__ +#pragma once #include #include @@ -91,5 +90,3 @@ private slots: private: History * m_history; }; - -#endif // HISTORYPANEWIDGET_HH diff --git a/src/ui/mainstatusbar.hh b/src/ui/mainstatusbar.hh index 3052d674..49ec24b0 100644 --- a/src/ui/mainstatusbar.hh +++ b/src/ui/mainstatusbar.hh @@ -1,8 +1,7 @@ /* This file is (c) 2012 Tvangeste * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef MAINSTATUSBAR_HH -#define MAINSTATUSBAR_HH +#pragma once #include #include @@ -40,5 +39,3 @@ private: bool eventFilter( QObject * obj, QEvent * event ) override; }; - -#endif // MAINSTATUSBAR_HH diff --git a/src/ui/maintabwidget.hh b/src/ui/maintabwidget.hh index ceabc507..31d83c20 100644 --- a/src/ui/maintabwidget.hh +++ b/src/ui/maintabwidget.hh @@ -1,8 +1,7 @@ /* This file is (c) 2012 Tvangeste * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef MAINTABWIDGET_HH -#define MAINTABWIDGET_HH +#pragma once #include #include @@ -31,5 +30,3 @@ private: bool hideSingleTab; }; - -#endif // MAINTABWIDGET_HH diff --git a/src/ui/mainwindow.hh b/src/ui/mainwindow.hh index 81752189..fcf108c7 100644 --- a/src/ui/mainwindow.hh +++ b/src/ui/mainwindow.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __MAINWINDOW_HH_INCLUDED__ -#define __MAINWINDOW_HH_INCLUDED__ +#pragma once #include #include @@ -505,5 +504,3 @@ public slots: setValue( progress ); } }; - -#endif diff --git a/src/ui/mruqmenu.hh b/src/ui/mruqmenu.hh index 238dc6db..6a0fcd96 100644 --- a/src/ui/mruqmenu.hh +++ b/src/ui/mruqmenu.hh @@ -1,5 +1,4 @@ -#ifndef MRUQMENU_HH -#define MRUQMENU_HH +#pragma once #include #include @@ -19,6 +18,3 @@ private: signals: void requestTabChange( int index ); }; - - -#endif // MRUQMENU_HH diff --git a/src/ui/orderandprops.hh b/src/ui/orderandprops.hh index dce11782..99c154e8 100644 --- a/src/ui/orderandprops.hh +++ b/src/ui/orderandprops.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __ORDERANDPROPS_HH_INCLUDED__ -#define __ORDERANDPROPS_HH_INCLUDED__ +#pragma once #include "ui_orderandprops.h" #include "groups_widgets.hh" @@ -40,5 +39,3 @@ private: signals: void showDictionaryHeadwords( Dictionary::Class * dict ); }; - -#endif diff --git a/src/ui/preferences.hh b/src/ui/preferences.hh index f5abf147..af6ac28f 100644 --- a/src/ui/preferences.hh +++ b/src/ui/preferences.hh @@ -1,5 +1,4 @@ -#ifndef __PREFERENCES_HH_INCLUDED__ -#define __PREFERENCES_HH_INCLUDED__ +#pragma once #include #include @@ -54,5 +53,3 @@ private slots: void on_collapseBigArticles_toggled( bool checked ); void on_limitInputPhraseLength_toggled( bool checked ); }; - -#endif diff --git a/src/ui/scanflag.hh b/src/ui/scanflag.hh index ffdb6090..9f11a546 100644 --- a/src/ui/scanflag.hh +++ b/src/ui/scanflag.hh @@ -1,5 +1,4 @@ -#ifndef SCAN_FLAG_H -#define SCAN_FLAG_H +#pragma once #include #include @@ -25,5 +24,3 @@ private: QTimer hideTimer; QPushButton * pushButton; }; - -#endif // SCAN_FLAG_H diff --git a/src/ui/scanpopup.hh b/src/ui/scanpopup.hh index bd28aa61..50927bb6 100644 --- a/src/ui/scanpopup.hh +++ b/src/ui/scanpopup.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __SCANPOPUP_HH_INCLUDED__ -#define __SCANPOPUP_HH_INCLUDED__ +#pragma once #include "article_netmgr.hh" #include "ui/articleview.hh" @@ -233,5 +232,3 @@ private slots: void titleChanged( ArticleView *, QString const & title ) const; }; - -#endif diff --git a/src/ui/searchpanel.hh b/src/ui/searchpanel.hh index 6d84e6a0..b1b3f580 100644 --- a/src/ui/searchpanel.hh +++ b/src/ui/searchpanel.hh @@ -1,5 +1,4 @@ -#ifndef GOLDENDICT_SEARCHPANEL_H -#define GOLDENDICT_SEARCHPANEL_H +#pragma once #include #include @@ -18,6 +17,3 @@ public: QPushButton * next; QCheckBox * caseSensitive; }; - - -#endif //GOLDENDICT_SEARCHPANEL_H diff --git a/src/ui/searchpanewidget.hh b/src/ui/searchpanewidget.hh index 02065ae4..ecf1f387 100644 --- a/src/ui/searchpanewidget.hh +++ b/src/ui/searchpanewidget.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __SEARCHPANEWIDGET_HH_INCLUDED__ -#define __SEARCHPANEWIDGET_HH_INCLUDED__ +#pragma once #include #include @@ -23,5 +22,3 @@ public: return QSize( 10, 204 ); } }; - -#endif diff --git a/src/ui/stylescombobox.hh b/src/ui/stylescombobox.hh index 2d4c1f6f..2381dac0 100644 --- a/src/ui/stylescombobox.hh +++ b/src/ui/stylescombobox.hh @@ -1,7 +1,6 @@ /* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __STYLESCOMBOBOX_HH_INCLUDED__ -#define __STYLESCOMBOBOX_HH_INCLUDED__ +#pragma once #include #include @@ -25,5 +24,3 @@ public: /// Returns current style. QString getCurrentStyle() const; }; - -#endif // __STYLESCOMBOBOX_HH_INCLUDED__ diff --git a/src/ui/translatebox.hh b/src/ui/translatebox.hh index e6a3b2b8..272d0a8b 100644 --- a/src/ui/translatebox.hh +++ b/src/ui/translatebox.hh @@ -1,8 +1,7 @@ /* This file is (c) 2012 Tvangeste * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef TRANSLATEBOX_HH -#define TRANSLATEBOX_HH +#pragma once #include #include @@ -40,5 +39,3 @@ private: QCompleter * completer; QStringList words; }; - -#endif // TRANSLATEBOX_HH diff --git a/src/webmultimediadownload.hh b/src/webmultimediadownload.hh index db9ccd7e..81827dc0 100644 --- a/src/webmultimediadownload.hh +++ b/src/webmultimediadownload.hh @@ -1,5 +1,4 @@ -#ifndef WEBMULTIMEDIADOWNLOAD_HH -#define WEBMULTIMEDIADOWNLOAD_HH +#pragma once #include "dict/dictionary.hh" #include @@ -28,5 +27,3 @@ private slots: }; } // namespace Dictionary - -#endif // WEBMULTIMEDIADOWNLOAD_HH diff --git a/src/weburlrequestinterceptor.hh b/src/weburlrequestinterceptor.hh index 5bb46c8e..cfef8f40 100644 --- a/src/weburlrequestinterceptor.hh +++ b/src/weburlrequestinterceptor.hh @@ -1,5 +1,4 @@ -#ifndef WEBURLREQUESTINTERCEPTOR_H -#define WEBURLREQUESTINTERCEPTOR_H +#pragma once #include @@ -13,5 +12,3 @@ public: signals: void linkClicked( const QUrl & url ); }; - -#endif // WEBURLREQUESTINTERCEPTOR_H diff --git a/src/windows/stub_msvc.h b/src/windows/stub_msvc.h index 34b8b684..b3a7ebd7 100644 --- a/src/windows/stub_msvc.h +++ b/src/windows/stub_msvc.h @@ -1,3 +1,5 @@ +#pragma once + #include #ifdef _MSC_VER #if !defined(strcasecmp) diff --git a/src/wordfinder.hh b/src/wordfinder.hh index e6a7d48d..49f938bc 100644 --- a/src/wordfinder.hh +++ b/src/wordfinder.hh @@ -1,8 +1,7 @@ /* This file is (c) 2008-2012 Konstantin Isakov * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ -#ifndef __WORDFINDER_HH_INCLUDED__ -#define __WORDFINDER_HH_INCLUDED__ +#pragma once #include #include @@ -196,5 +195,3 @@ private: } }; }; - -#endif