mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
clean code: replace throw() with noexcept
This commit is contained in:
parent
58fdbae34f
commit
ba10f68c1c
12
aard.cc
12
aard.cc
|
@ -239,16 +239,16 @@ class AardDictionary: public BtreeIndexing::BtreeDictionary
|
|||
|
||||
~AardDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -284,7 +284,7 @@ class AardDictionary: public BtreeIndexing::BtreeDictionary
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -338,7 +338,7 @@ AardDictionary::~AardDictionary()
|
|||
df.close();
|
||||
}
|
||||
|
||||
void AardDictionary::loadIcon() throw()
|
||||
void AardDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
bgl.cc
12
bgl.cc
|
@ -198,16 +198,16 @@ namespace
|
|||
BglDictionary( string const & id, string const & indexFile,
|
||||
string const & dictionaryFile );
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -249,7 +249,7 @@ namespace
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -302,7 +302,7 @@ namespace
|
|||
FTS_index_completed.ref();
|
||||
}
|
||||
|
||||
void BglDictionary::loadIcon() throw()
|
||||
void BglDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
|
@ -155,7 +155,7 @@ public:
|
|||
BtreeDictionary( string const & id, vector< string > const & dictionaryFiles );
|
||||
|
||||
/// Btree-indexed dictionaries are usually a good source for compound searches.
|
||||
virtual Dictionary::Features getFeatures() const throw()
|
||||
virtual Dictionary::Features getFeatures() const noexcept
|
||||
{ return Dictionary::SuitableForCompoundSearching; }
|
||||
|
||||
/// This function does the search using the btree index. Derivatives usually
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
~CharacterConversionDictionary();
|
||||
|
||||
std::vector< gd::wstring > getAlternateWritings( gd::wstring const & )
|
||||
throw();
|
||||
noexcept;
|
||||
};
|
||||
|
||||
CharacterConversionDictionary::CharacterConversionDictionary( std::string const & id,
|
||||
|
@ -70,7 +70,7 @@ CharacterConversionDictionary::~CharacterConversionDictionary()
|
|||
}
|
||||
|
||||
std::vector< gd::wstring > CharacterConversionDictionary::getAlternateWritings( gd::wstring const & str )
|
||||
throw()
|
||||
noexcept
|
||||
{
|
||||
std::vector< gd::wstring > results;
|
||||
|
||||
|
|
20
config.cc
20
config.cc
|
@ -2252,7 +2252,7 @@ QString getUserQtCssFileName()
|
|||
return getHomeDir().filePath( "qt-style.css" );
|
||||
}
|
||||
|
||||
QString getProgramDataDir() throw()
|
||||
QString getProgramDataDir() noexcept
|
||||
{
|
||||
if ( isPortableVersion() )
|
||||
return QCoreApplication::applicationDirPath();
|
||||
|
@ -2264,12 +2264,12 @@ QString getProgramDataDir() throw()
|
|||
#endif
|
||||
}
|
||||
|
||||
QString getEmbedLocDir() throw()
|
||||
QString getEmbedLocDir() noexcept
|
||||
{
|
||||
return ":/locale";
|
||||
}
|
||||
|
||||
QString getLocDir() throw()
|
||||
QString getLocDir() noexcept
|
||||
{
|
||||
if ( QDir( getProgramDataDir() ).cd( "locale" ) )
|
||||
return getProgramDataDir() + "/locale";
|
||||
|
@ -2277,7 +2277,7 @@ QString getLocDir() throw()
|
|||
return QCoreApplication::applicationDirPath() + "/locale";
|
||||
}
|
||||
|
||||
QString getHelpDir() throw()
|
||||
QString getHelpDir() noexcept
|
||||
{
|
||||
if ( QDir( getProgramDataDir() ).cd( "help" ) )
|
||||
return getProgramDataDir() + "/help";
|
||||
|
@ -2286,7 +2286,7 @@ QString getHelpDir() throw()
|
|||
}
|
||||
|
||||
#ifdef MAKE_CHINESE_CONVERSION_SUPPORT
|
||||
QString getOpenCCDir() throw()
|
||||
QString getOpenCCDir() noexcept
|
||||
{
|
||||
#if defined( Q_OS_WIN )
|
||||
if ( QDir( "opencc" ).exists() )
|
||||
|
@ -2305,7 +2305,7 @@ QString getOpenCCDir() throw()
|
|||
}
|
||||
#endif
|
||||
|
||||
bool isPortableVersion() throw()
|
||||
bool isPortableVersion() noexcept
|
||||
{
|
||||
struct IsPortable
|
||||
{
|
||||
|
@ -2320,7 +2320,7 @@ bool isPortableVersion() throw()
|
|||
return p.isPortable;
|
||||
}
|
||||
|
||||
QString getPortableVersionDictionaryDir() throw()
|
||||
QString getPortableVersionDictionaryDir() noexcept
|
||||
{
|
||||
if ( isPortableVersion() )
|
||||
return getProgramDataDir() + "/content";
|
||||
|
@ -2328,7 +2328,7 @@ QString getPortableVersionDictionaryDir() throw()
|
|||
return QString();
|
||||
}
|
||||
|
||||
QString getPortableVersionMorphoDir() throw()
|
||||
QString getPortableVersionMorphoDir() noexcept
|
||||
{
|
||||
if ( isPortableVersion() )
|
||||
return getPortableVersionDictionaryDir() + "/morphology";
|
||||
|
@ -2348,7 +2348,7 @@ QString getStylesDir()
|
|||
return result.path() + QDir::separator();
|
||||
}
|
||||
|
||||
QString getCacheDir() throw()
|
||||
QString getCacheDir() noexcept
|
||||
{
|
||||
return isPortableVersion() ? portableHomeDirPath() + "/cache"
|
||||
#ifdef HAVE_X11
|
||||
|
@ -2358,7 +2358,7 @@ QString getCacheDir() throw()
|
|||
#endif
|
||||
}
|
||||
|
||||
QString getNetworkCacheDir() throw()
|
||||
QString getNetworkCacheDir() noexcept
|
||||
{
|
||||
return getCacheDir() + "/network";
|
||||
}
|
||||
|
|
20
config.hh
20
config.hh
|
@ -808,40 +808,40 @@ QString getUserQtCssFileName() ;
|
|||
|
||||
/// Returns the program's data dir. Under Linux that would be something like
|
||||
/// /usr/share/apps/goldendict, under Windows C:/Program Files/GoldenDict.
|
||||
QString getProgramDataDir() throw();
|
||||
QString getProgramDataDir() noexcept;
|
||||
|
||||
/// Returns the directory storing program localizized files (.qm).
|
||||
QString getEmbedLocDir() throw();
|
||||
QString getLocDir() throw();
|
||||
QString getEmbedLocDir() noexcept;
|
||||
QString getLocDir() noexcept;
|
||||
|
||||
/// Returns the directory storing program help files (.qch).
|
||||
QString getHelpDir() throw();
|
||||
QString getHelpDir() noexcept;
|
||||
|
||||
#ifdef MAKE_CHINESE_CONVERSION_SUPPORT
|
||||
/// Returns the directory storing OpenCC configuration and dictionary files (.json and .ocd).
|
||||
QString getOpenCCDir() throw();
|
||||
QString getOpenCCDir() noexcept;
|
||||
#endif
|
||||
|
||||
/// Returns true if the program is configured as a portable version. In that
|
||||
/// mode, all the settings and indices are kept in the program's directory.
|
||||
bool isPortableVersion() throw();
|
||||
bool isPortableVersion() noexcept;
|
||||
|
||||
/// Returns directory with dictionaries for portable version. It is content/
|
||||
/// in the application's directory.
|
||||
QString getPortableVersionDictionaryDir() throw();
|
||||
QString getPortableVersionDictionaryDir() noexcept;
|
||||
|
||||
/// Returns directory with morpgologies for portable version. It is
|
||||
/// content/morphology in the application's directory.
|
||||
QString getPortableVersionMorphoDir() throw();
|
||||
QString getPortableVersionMorphoDir() noexcept;
|
||||
|
||||
/// Returns the add-on styles directory.
|
||||
QString getStylesDir();
|
||||
|
||||
/// Returns the directory where user-specific non-essential (cached) data should be written.
|
||||
QString getCacheDir() throw();
|
||||
QString getCacheDir() noexcept;
|
||||
|
||||
/// Returns the article network disk cache directory.
|
||||
QString getNetworkCacheDir() throw();
|
||||
QString getNetworkCacheDir() noexcept;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -100,19 +100,19 @@ public:
|
|||
|
||||
~DictdDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
{ return idxHeader.langFrom; }
|
||||
|
@ -215,7 +215,7 @@ string nameFromFileName( string const & indexFileName )
|
|||
return Utf8::encode( FsEncoding::decode( string( sep + 1, dot - sep - 1 ) ) );
|
||||
}
|
||||
|
||||
void DictdDictionary::loadIcon() throw()
|
||||
void DictdDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
|
@ -159,7 +159,7 @@ sptr< WordSearchRequest > Class::findHeadwordsForSynonym( wstring const & )
|
|||
}
|
||||
|
||||
vector< wstring > Class::getAlternateWritings( wstring const & )
|
||||
throw()
|
||||
noexcept
|
||||
{
|
||||
return vector< wstring >();
|
||||
}
|
||||
|
@ -185,21 +185,21 @@ QString Class::getMainFilename()
|
|||
return QString();
|
||||
}
|
||||
|
||||
QIcon const & Class::getIcon() throw()
|
||||
QIcon const & Class::getIcon() noexcept
|
||||
{
|
||||
if( !dictionaryIconLoaded )
|
||||
loadIcon();
|
||||
return dictionaryIcon;
|
||||
}
|
||||
|
||||
QIcon const & Class::getNativeIcon() throw()
|
||||
QIcon const & Class::getNativeIcon() noexcept
|
||||
{
|
||||
if( !dictionaryIconLoaded )
|
||||
loadIcon();
|
||||
return dictionaryNativeIcon;
|
||||
}
|
||||
|
||||
void Class::loadIcon() throw()
|
||||
void Class::loadIcon() noexcept
|
||||
{
|
||||
dictionaryIconLoaded = true;
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ void Class::isolateCSS( QString & css, QString const & wrapperSelector )
|
|||
css = newCSS;
|
||||
}
|
||||
|
||||
string makeDictionaryId( vector< string > const & dictionaryFiles ) throw()
|
||||
string makeDictionaryId( vector< string > const & dictionaryFiles ) noexcept
|
||||
{
|
||||
std::vector< string > sortedList;
|
||||
|
||||
|
@ -470,7 +470,7 @@ string makeDictionaryId( vector< string > const & dictionaryFiles ) throw()
|
|||
// of a timestamp of the file, so we use here Qt anyway. It is supposed to
|
||||
// be fixed in the future when it's needed.
|
||||
bool needToRebuildIndex( vector< string > const & dictionaryFiles,
|
||||
string const & indexFile ) throw()
|
||||
string const & indexFile ) noexcept
|
||||
{
|
||||
unsigned long lastModified = 0;
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ protected:
|
|||
|
||||
// Load user icon if it exist
|
||||
// By default set icon to empty
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
// Load icon from filename directly if isFullName == true
|
||||
// else treat filename as name without extension
|
||||
|
@ -295,39 +295,39 @@ public:
|
|||
virtual void deferredInit();
|
||||
|
||||
/// Returns the dictionary's id.
|
||||
string getId() throw()
|
||||
string getId() noexcept
|
||||
{ return id; }
|
||||
|
||||
/// Returns the list of file names the dictionary consists of.
|
||||
vector< string > const & getDictionaryFilenames() throw()
|
||||
vector< string > const & getDictionaryFilenames() noexcept
|
||||
{ return dictionaryFiles; }
|
||||
|
||||
/// Returns the dictionary's full name, utf8.
|
||||
virtual string getName() throw()=0;
|
||||
virtual string getName() noexcept=0;
|
||||
|
||||
/// Returns all the available properties, like the author's name, copyright,
|
||||
/// description etc. All strings are in utf8.
|
||||
virtual map< Property, string > getProperties() throw()=0;
|
||||
virtual map< Property, string > getProperties() noexcept=0;
|
||||
|
||||
/// Returns the features the dictionary possess. See the Feature enum for
|
||||
/// their list.
|
||||
virtual Features getFeatures() const throw()
|
||||
virtual Features getFeatures() const noexcept
|
||||
{ return NoFeatures; }
|
||||
|
||||
/// Returns the number of articles in the dictionary.
|
||||
virtual unsigned long getArticleCount() throw()=0;
|
||||
virtual unsigned long getArticleCount() noexcept=0;
|
||||
|
||||
/// Returns the number of words in the dictionary. This can be equal to
|
||||
/// the number of articles, or can be larger if some synonyms are present.
|
||||
virtual unsigned long getWordCount() throw()=0;
|
||||
virtual unsigned long getWordCount() noexcept=0;
|
||||
|
||||
/// Returns the dictionary's icon.
|
||||
virtual QIcon const & getIcon() throw();
|
||||
virtual QIcon const & getIcon() noexcept;
|
||||
|
||||
/// Returns the dictionary's native icon. Dsl icons are usually rectangular,
|
||||
/// and are adapted by getIcon() to be square. This function allows getting
|
||||
/// the original icon with no geometry transformations applied.
|
||||
virtual QIcon const & getNativeIcon() throw();
|
||||
virtual QIcon const & getNativeIcon() noexcept;
|
||||
|
||||
/// Returns the dictionary's source language.
|
||||
virtual quint32 getLangFrom() const
|
||||
|
@ -371,7 +371,7 @@ public:
|
|||
/// supposed to be very fast and simple, and the results are thus returned
|
||||
/// synchronously.
|
||||
virtual vector< wstring > getAlternateWritings( wstring const & )
|
||||
throw();
|
||||
noexcept;
|
||||
|
||||
/// Returns a definition for the given word. The definition should
|
||||
/// be an html fragment (without html/head/body tags) in an utf8 encoding.
|
||||
|
@ -454,7 +454,7 @@ public:
|
|||
/// dictionary is being indexed. Since indexing can take some time, this
|
||||
/// is useful to show in some kind of a splash screen.
|
||||
/// The dictionaryName is in utf8.
|
||||
virtual void indexingDictionary( string const & dictionaryName ) throw()=0;
|
||||
virtual void indexingDictionary( string const & dictionaryName ) noexcept=0;
|
||||
|
||||
virtual ~Initializing()
|
||||
{}
|
||||
|
@ -465,7 +465,7 @@ public:
|
|||
/// hashing the file names. This id should be used to identify dictionary
|
||||
/// and for the index file name, if one is needed.
|
||||
/// This function is supposed to be used by dictionary implementations.
|
||||
string makeDictionaryId( vector< string > const & dictionaryFiles ) throw();
|
||||
string makeDictionaryId( vector< string > const & dictionaryFiles ) noexcept;
|
||||
|
||||
/// Checks if it is needed to regenerate index file based on its timestamp
|
||||
/// and the timestamps of the dictionary files. If some files are newer than
|
||||
|
@ -473,7 +473,7 @@ string makeDictionaryId( vector< string > const & dictionaryFiles ) throw();
|
|||
/// dictionary files don't exist, returns true, too.
|
||||
/// This function is supposed to be used by dictionary implementations.
|
||||
bool needToRebuildIndex( vector< string > const & dictionaryFiles,
|
||||
string const & indexFile ) throw();
|
||||
string const & indexFile ) noexcept;
|
||||
|
||||
/// Returns a random dictionary id useful for interactively created
|
||||
/// dictionaries.
|
||||
|
|
|
@ -209,16 +209,16 @@ public:
|
|||
strategies.append( "prefix" );
|
||||
}
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return name; }
|
||||
|
||||
virtual map< Property, string > getProperties() throw()
|
||||
virtual map< Property, string > getProperties() noexcept
|
||||
{ return map< Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual sptr< WordSearchRequest > prefixMatch( wstring const &,
|
||||
|
@ -237,7 +237,7 @@ public:
|
|||
virtual QString const & getDescription();
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
void getServerDatabases();
|
||||
|
||||
|
@ -245,7 +245,7 @@ protected:
|
|||
friend class DictServerArticleRequest;
|
||||
};
|
||||
|
||||
void DictServerDictionary::loadIcon() throw()
|
||||
void DictServerDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
dsl.cc
12
dsl.cc
|
@ -183,16 +183,16 @@ public:
|
|||
|
||||
~DslDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -247,7 +247,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -466,7 +466,7 @@ void DslDictionary::doDeferredInit()
|
|||
}
|
||||
|
||||
|
||||
void DslDictionary::loadIcon() throw()
|
||||
void DslDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
|
@ -983,7 +983,7 @@ DslScanner::DslScanner( string const & fileName ) :
|
|||
readBufferLeft = 0;
|
||||
}
|
||||
|
||||
DslScanner::~DslScanner() throw()
|
||||
DslScanner::~DslScanner() noexcept
|
||||
{
|
||||
gzclose( f );
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ public:
|
|||
DEF_EX( exEncodingError, "Encoding error", Ex ) // Should never happen really
|
||||
|
||||
DslScanner( string const & fileName ) ;
|
||||
~DslScanner() throw();
|
||||
~DslScanner() noexcept;
|
||||
|
||||
/// Returns the detected encoding of this file.
|
||||
Encoding getEncoding() const
|
||||
|
|
12
epwing.cc
12
epwing.cc
|
@ -96,16 +96,16 @@ public:
|
|||
|
||||
~EpwingDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return bookName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -163,7 +163,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
void loadIcon() throw();
|
||||
void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -244,7 +244,7 @@ EpwingDictionary::~EpwingDictionary()
|
|||
removeDirectory( cacheDirectory );
|
||||
}
|
||||
|
||||
void EpwingDictionary::loadIcon() throw()
|
||||
void EpwingDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
8
ex.hh
8
ex.hh
|
@ -14,8 +14,8 @@
|
|||
#define DEF_EX( exName, exDescription, exParent ) \
|
||||
class exName: public exParent { \
|
||||
public: \
|
||||
virtual const char * what() const throw() { return (exDescription); } \
|
||||
virtual ~exName() throw() {} };
|
||||
virtual const char * what() const noexcept { return (exDescription); } \
|
||||
virtual ~exName() noexcept {} };
|
||||
|
||||
/// Same as DEF_EX, but takes a runtime string argument, which gets concatenated
|
||||
/// with the description.
|
||||
|
@ -31,7 +31,7 @@ class exName: public exParent { \
|
|||
std::string value; \
|
||||
public: \
|
||||
exName( std::string const & value_ ): value( std::string( exDescription ) + " " + value_ ) {} \
|
||||
virtual const char * what() const throw() { return value.c_str(); } \
|
||||
virtual ~exName() throw() {} };
|
||||
virtual const char * what() const noexcept { return value.c_str(); } \
|
||||
virtual ~exName() noexcept {} };
|
||||
|
||||
#endif
|
||||
|
|
4
file.cc
4
file.cc
|
@ -65,7 +65,7 @@ void loadFromFile( std::string const & n, std::vector< char > & data )
|
|||
f.read( &data.front(), data.size() );
|
||||
}
|
||||
|
||||
bool exists( char const * filename ) throw()
|
||||
bool exists( char const * filename ) noexcept
|
||||
{
|
||||
#ifdef __WIN32
|
||||
#if defined(__WIN64) || defined(_MSC_VER)
|
||||
|
@ -313,7 +313,7 @@ void Class::close()
|
|||
f.close();
|
||||
}
|
||||
|
||||
Class::~Class() throw()
|
||||
Class::~Class() noexcept
|
||||
{
|
||||
if ( f.isOpen() )
|
||||
{
|
||||
|
|
6
file.hh
6
file.hh
|
@ -30,9 +30,9 @@ bool tryPossibleZipName( std::string const & name, std::string & copyTo );
|
|||
|
||||
void loadFromFile( std::string const & n, std::vector< char > & data );
|
||||
|
||||
bool exists( char const * filename ) throw();
|
||||
bool exists( char const * filename ) noexcept;
|
||||
|
||||
inline bool exists( std::string const & filename ) throw()
|
||||
inline bool exists( std::string const & filename ) noexcept
|
||||
{ return exists( filename.c_str() ); }
|
||||
|
||||
class Class
|
||||
|
@ -116,7 +116,7 @@ public:
|
|||
/// Closes the file. No further operations are valid.
|
||||
void close() ;
|
||||
|
||||
~Class() throw();
|
||||
~Class() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
|
12
forvo.cc
12
forvo.cc
|
@ -42,16 +42,16 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return name; }
|
||||
|
||||
virtual map< Property, string > getProperties() throw()
|
||||
virtual map< Property, string > getProperties() noexcept
|
||||
{ return map< Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual sptr< WordSearchRequest > prefixMatch( wstring const & /*word*/,
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
};
|
||||
|
||||
|
@ -90,7 +90,7 @@ sptr< DataRequest > ForvoDictionary::getArticle( wstring const & word,
|
|||
netMgr );
|
||||
}
|
||||
|
||||
void ForvoDictionary::loadIcon() throw()
|
||||
void ForvoDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
16
gls.cc
16
gls.cc
|
@ -88,7 +88,7 @@ public:
|
|||
DEF_EX( exEncodingError, "Encoding error", Ex ) // Should never happen really
|
||||
|
||||
GlsScanner( string const & fileName ) ;
|
||||
~GlsScanner() throw();
|
||||
~GlsScanner() noexcept;
|
||||
|
||||
/// Returns the detected encoding of this file.
|
||||
Encoding getEncoding() const
|
||||
|
@ -293,7 +293,7 @@ bool GlsScanner::readNextLine( wstring & out, size_t & offset )
|
|||
}
|
||||
}
|
||||
|
||||
GlsScanner::~GlsScanner() throw()
|
||||
GlsScanner::~GlsScanner() noexcept
|
||||
{
|
||||
gzclose( f );
|
||||
}
|
||||
|
@ -372,16 +372,16 @@ public:
|
|||
|
||||
~GlsDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -425,7 +425,7 @@ public:
|
|||
}
|
||||
protected:
|
||||
|
||||
void loadIcon() throw();
|
||||
void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -517,7 +517,7 @@ GlsDictionary::~GlsDictionary()
|
|||
dict_data_close( dz );
|
||||
}
|
||||
|
||||
void GlsDictionary::loadIcon() throw()
|
||||
void GlsDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
16
hunspell.cc
16
hunspell.cc
|
@ -63,16 +63,16 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return name; }
|
||||
|
||||
virtual map< Property, string > getProperties() throw()
|
||||
virtual map< Property, string > getProperties() noexcept
|
||||
{ return map< Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual sptr< WordSearchRequest > prefixMatch( wstring const &,
|
||||
|
@ -91,11 +91,11 @@ public:
|
|||
virtual bool isLocalDictionary()
|
||||
{ return true; }
|
||||
|
||||
virtual vector< wstring > getAlternateWritings( const wstring & word ) throw();
|
||||
virtual vector< wstring > getAlternateWritings( const wstring & word ) noexcept;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -142,7 +142,7 @@ bool containsWhitespace( wstring const & str )
|
|||
return false;
|
||||
}
|
||||
|
||||
void HunspellDictionary::loadIcon() throw()
|
||||
void HunspellDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
@ -162,7 +162,7 @@ void HunspellDictionary::loadIcon() throw()
|
|||
dictionaryIconLoaded = true;
|
||||
}
|
||||
|
||||
vector< wstring > HunspellDictionary::getAlternateWritings( wstring const & word ) throw()
|
||||
vector< wstring > HunspellDictionary::getAlternateWritings( wstring const & word ) noexcept
|
||||
{
|
||||
vector< wstring > results;
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ void LoadDictionaries::handlePath( Config::Path const & path )
|
|||
#endif
|
||||
}
|
||||
|
||||
void LoadDictionaries::indexingDictionary( string const & dictionaryName ) throw()
|
||||
void LoadDictionaries::indexingDictionary( string const & dictionaryName ) noexcept
|
||||
{
|
||||
emit indexingDictionarySignal( QString::fromUtf8( dictionaryName.c_str() ) );
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ signals:
|
|||
|
||||
public:
|
||||
|
||||
virtual void indexingDictionary( std::string const & dictionaryName ) throw();
|
||||
virtual void indexingDictionary( std::string const & dictionaryName ) noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
|
14
lsa.cc
14
lsa.cc
|
@ -164,15 +164,15 @@ public:
|
|||
LsaDictionary( string const & id, string const & indexFile,
|
||||
vector< string > const & dictionaryFiles );
|
||||
|
||||
virtual string getName() throw();
|
||||
virtual string getName() noexcept;
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.soundsCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return getArticleCount(); }
|
||||
|
||||
virtual sptr< Dictionary::DataRequest > getArticle( wstring const &,
|
||||
|
@ -186,10 +186,10 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
};
|
||||
|
||||
string LsaDictionary::getName() throw()
|
||||
string LsaDictionary::getName() noexcept
|
||||
{
|
||||
string result = FsEncoding::basename( getDictionaryFilenames()[ 0 ] );
|
||||
|
||||
|
@ -498,7 +498,7 @@ sptr< Dictionary::DataRequest > LsaDictionary::getResource( string const & name
|
|||
return dr;
|
||||
}
|
||||
|
||||
void LsaDictionary::loadIcon() throw()
|
||||
void LsaDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
mdx.cc
12
mdx.cc
|
@ -266,22 +266,22 @@ public:
|
|||
|
||||
virtual void deferredInit();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{
|
||||
return dictionaryName;
|
||||
}
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{
|
||||
return map< Dictionary::Property, string >();
|
||||
}
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{
|
||||
return idxHeader.articleCount;
|
||||
}
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{
|
||||
return idxHeader.wordCount;
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -925,7 +925,7 @@ const QString & MdxDictionary::getDescription()
|
|||
return dictionaryDescription;
|
||||
}
|
||||
|
||||
void MdxDictionary::loadIcon() throw()
|
||||
void MdxDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
mediawiki.cc
12
mediawiki.cc
|
@ -47,16 +47,16 @@ public:
|
|||
langId = LangCoder::code2toInt( url.mid( n - 2, 2 ).toLatin1().data() );
|
||||
}
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return name; }
|
||||
|
||||
virtual map< Property, string > getProperties() throw()
|
||||
virtual map< Property, string > getProperties() noexcept
|
||||
{ return map< Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual sptr< WordSearchRequest > prefixMatch( wstring const &,
|
||||
|
@ -73,11 +73,11 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
};
|
||||
|
||||
void MediaWikiDictionary::loadIcon() throw()
|
||||
void MediaWikiDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
programs.cc
12
programs.cc
|
@ -30,16 +30,16 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return prg.name.toUtf8().data(); }
|
||||
|
||||
virtual map< Property, string > getProperties() throw()
|
||||
virtual map< Property, string > getProperties() noexcept
|
||||
{ return map< Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual sptr< WordSearchRequest > prefixMatch( wstring const & word,
|
||||
|
@ -53,7 +53,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
};
|
||||
|
||||
sptr< WordSearchRequest > ProgramsDictionary::prefixMatch( wstring const & word,
|
||||
|
@ -118,7 +118,7 @@ sptr< Dictionary::DataRequest > ProgramsDictionary::getArticle(
|
|||
}
|
||||
}
|
||||
|
||||
void ProgramsDictionary::loadIcon() throw()
|
||||
void ProgramsDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
sdict.cc
12
sdict.cc
|
@ -143,16 +143,16 @@ class SdictDictionary: public BtreeIndexing::BtreeDictionary
|
|||
|
||||
~SdictDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -187,7 +187,7 @@ class SdictDictionary: public BtreeIndexing::BtreeDictionary
|
|||
}
|
||||
protected:
|
||||
|
||||
void loadIcon() throw();
|
||||
void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -240,7 +240,7 @@ SdictDictionary::~SdictDictionary()
|
|||
df.close();
|
||||
}
|
||||
|
||||
void SdictDictionary::loadIcon() throw()
|
||||
void SdictDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
slob.cc
12
slob.cc
|
@ -587,16 +587,16 @@ class SlobDictionary: public BtreeIndexing::BtreeDictionary
|
|||
|
||||
~SlobDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -643,7 +643,7 @@ class SlobDictionary: public BtreeIndexing::BtreeDictionary
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -746,7 +746,7 @@ void SlobDictionary::removeDirectory( QString const & directory )
|
|||
dir.rmdir( directory );
|
||||
}
|
||||
|
||||
void SlobDictionary::loadIcon() throw()
|
||||
void SlobDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
sounddir.cc
12
sounddir.cc
|
@ -79,16 +79,16 @@ public:
|
|||
vector< string > const & dictionaryFiles,
|
||||
QString const & iconFilename_ );
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return name; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.soundsCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return getArticleCount(); }
|
||||
|
||||
virtual sptr< Dictionary::DataRequest > getArticle( wstring const &,
|
||||
|
@ -102,7 +102,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
};
|
||||
|
||||
SoundDirDictionary::SoundDirDictionary( string const & id,
|
||||
|
@ -289,7 +289,7 @@ sptr< Dictionary::DataRequest > SoundDirDictionary::getArticle( wstring const &
|
|||
return ret;
|
||||
}
|
||||
|
||||
void SoundDirDictionary::loadIcon() throw()
|
||||
void SoundDirDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
stardict.cc
12
stardict.cc
|
@ -155,16 +155,16 @@ public:
|
|||
|
||||
~StardictDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return bookName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount + idxHeader.synWordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -207,7 +207,7 @@ public:
|
|||
}
|
||||
protected:
|
||||
|
||||
void loadIcon() throw();
|
||||
void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -292,7 +292,7 @@ StardictDictionary::~StardictDictionary()
|
|||
dict_data_close( dz );
|
||||
}
|
||||
|
||||
void StardictDictionary::loadIcon() throw()
|
||||
void StardictDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
|
@ -22,16 +22,16 @@ BaseTransliterationDictionary::BaseTransliterationDictionary( string const & id,
|
|||
dictionaryIconLoaded = true;
|
||||
}
|
||||
|
||||
string BaseTransliterationDictionary::getName() throw()
|
||||
string BaseTransliterationDictionary::getName() noexcept
|
||||
{ return name; }
|
||||
|
||||
map< Dictionary::Property, string > BaseTransliterationDictionary::getProperties() throw()
|
||||
map< Dictionary::Property, string > BaseTransliterationDictionary::getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
unsigned long BaseTransliterationDictionary::getArticleCount() throw()
|
||||
unsigned long BaseTransliterationDictionary::getArticleCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
unsigned long BaseTransliterationDictionary::getWordCount() throw()
|
||||
unsigned long BaseTransliterationDictionary::getWordCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
sptr< Dictionary::WordSearchRequest > BaseTransliterationDictionary::prefixMatch( wstring const &,
|
||||
|
@ -83,7 +83,7 @@ TransliterationDictionary::TransliterationDictionary( string const & id,
|
|||
}
|
||||
|
||||
vector< wstring > TransliterationDictionary::getAlternateWritings( wstring const & str )
|
||||
throw()
|
||||
noexcept
|
||||
{
|
||||
vector< wstring > results;
|
||||
|
||||
|
|
|
@ -28,16 +28,16 @@ public:
|
|||
BaseTransliterationDictionary( string const & id, string const & name,
|
||||
QIcon icon, bool caseSensitive = true );
|
||||
|
||||
virtual string getName() throw();
|
||||
virtual string getName() noexcept;
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw();
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept;
|
||||
|
||||
virtual unsigned long getArticleCount() throw();
|
||||
virtual unsigned long getArticleCount() noexcept;
|
||||
|
||||
virtual unsigned long getWordCount() throw();
|
||||
virtual unsigned long getWordCount() noexcept;
|
||||
|
||||
virtual vector< wstring > getAlternateWritings( wstring const & )
|
||||
throw() = 0;
|
||||
noexcept = 0;
|
||||
|
||||
virtual sptr< Dictionary::WordSearchRequest > findHeadwordsForSynonym( wstring const & )
|
||||
;
|
||||
|
@ -85,7 +85,7 @@ public:
|
|||
bool caseSensitive = true );
|
||||
|
||||
virtual vector< wstring > getAlternateWritings( wstring const & )
|
||||
throw();
|
||||
noexcept;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
2
utf8.cc
2
utf8.cc
|
@ -132,7 +132,7 @@ long decode( char const * in_, size_t inSize, wchar * out_ )
|
|||
return out - out_;
|
||||
}
|
||||
|
||||
string encode( wstring const & in ) throw()
|
||||
string encode( wstring const & in ) noexcept
|
||||
{
|
||||
if( in.size() == 0 )
|
||||
return string();
|
||||
|
|
2
utf8.hh
2
utf8.hh
|
@ -44,7 +44,7 @@ size_t encode( wchar const * in, size_t inSize, char * out );
|
|||
long decode( char const * in, size_t inSize, wchar * out );
|
||||
|
||||
/// Versions for non time-critical code.
|
||||
string encode( wstring const & ) throw();
|
||||
string encode( wstring const & ) noexcept;
|
||||
wstring decode( string const & ) ;
|
||||
|
||||
/// Since the standard isspace() is locale-specific, we need something
|
||||
|
|
|
@ -44,16 +44,16 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return voiceEngine.name.toUtf8().data(); }
|
||||
|
||||
virtual map< Property, string > getProperties() throw()
|
||||
virtual map< Property, string > getProperties() noexcept
|
||||
{ return map< Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual sptr< WordSearchRequest > prefixMatch( wstring const & word,
|
||||
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
};
|
||||
|
||||
sptr< WordSearchRequest > VoiceEnginesDictionary::prefixMatch( wstring const & /*word*/,
|
||||
|
@ -110,7 +110,7 @@ sptr< Dictionary::DataRequest > VoiceEnginesDictionary::getArticle(
|
|||
return ret;
|
||||
}
|
||||
|
||||
void VoiceEnginesDictionary::loadIcon() throw()
|
||||
void VoiceEnginesDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
website.cc
12
website.cc
|
@ -53,16 +53,16 @@ public:
|
|||
dictionaryDescription = temp;
|
||||
}
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return name; }
|
||||
|
||||
virtual map< Property, string > getProperties() throw()
|
||||
virtual map< Property, string > getProperties() noexcept
|
||||
{ return map< Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return 0; }
|
||||
|
||||
virtual sptr< WordSearchRequest > prefixMatch( wstring const & word,
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
};
|
||||
|
||||
sptr< WordSearchRequest > WebSiteDictionary::prefixMatch( wstring const & /*word*/,
|
||||
|
@ -526,7 +526,7 @@ sptr< Dictionary::DataRequest > WebSiteDictionary::getResource( string const & n
|
|||
return new WebSiteResourceRequest( link, netMgr, this );
|
||||
}
|
||||
|
||||
void WebSiteDictionary::loadIcon() throw()
|
||||
void WebSiteDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
xdxf.cc
12
xdxf.cc
|
@ -147,16 +147,16 @@ public:
|
|||
|
||||
~XdxfDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -200,7 +200,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
void loadIcon() throw();
|
||||
void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -312,7 +312,7 @@ XdxfDictionary::~XdxfDictionary()
|
|||
dict_data_close( dz );
|
||||
}
|
||||
|
||||
void XdxfDictionary::loadIcon() throw()
|
||||
void XdxfDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
12
zim.cc
12
zim.cc
|
@ -669,16 +669,16 @@ class ZimDictionary: public BtreeIndexing::BtreeDictionary
|
|||
|
||||
~ZimDictionary();
|
||||
|
||||
virtual string getName() throw()
|
||||
virtual string getName() noexcept
|
||||
{ return dictionaryName; }
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.articleCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return idxHeader.wordCount; }
|
||||
|
||||
inline virtual quint32 getLangFrom() const
|
||||
|
@ -725,7 +725,7 @@ class ZimDictionary: public BtreeIndexing::BtreeDictionary
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -792,7 +792,7 @@ ZimDictionary::~ZimDictionary()
|
|||
df.close();
|
||||
}
|
||||
|
||||
void ZimDictionary::loadIcon() throw()
|
||||
void ZimDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
14
zipsounds.cc
14
zipsounds.cc
|
@ -114,15 +114,15 @@ public:
|
|||
ZipSoundsDictionary( string const & id, string const & indexFile,
|
||||
vector< string > const & dictionaryFiles );
|
||||
|
||||
virtual string getName() throw();
|
||||
virtual string getName() noexcept;
|
||||
|
||||
virtual map< Dictionary::Property, string > getProperties() throw()
|
||||
virtual map< Dictionary::Property, string > getProperties() noexcept
|
||||
{ return map< Dictionary::Property, string >(); }
|
||||
|
||||
virtual unsigned long getArticleCount() throw()
|
||||
virtual unsigned long getArticleCount() noexcept
|
||||
{ return idxHeader.soundsCount; }
|
||||
|
||||
virtual unsigned long getWordCount() throw()
|
||||
virtual unsigned long getWordCount() noexcept
|
||||
{ return getArticleCount(); }
|
||||
|
||||
virtual sptr< Dictionary::DataRequest > getArticle( wstring const &,
|
||||
|
@ -136,7 +136,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void loadIcon() throw();
|
||||
virtual void loadIcon() noexcept;
|
||||
};
|
||||
|
||||
ZipSoundsDictionary::ZipSoundsDictionary( string const & id,
|
||||
|
@ -164,7 +164,7 @@ ZipSoundsDictionary::ZipSoundsDictionary( string const & id,
|
|||
|
||||
}
|
||||
|
||||
string ZipSoundsDictionary::getName() throw()
|
||||
string ZipSoundsDictionary::getName() noexcept
|
||||
{
|
||||
string result = FsEncoding::basename( getDictionaryFilenames()[ 0 ] );
|
||||
|
||||
|
@ -384,7 +384,7 @@ sptr< Dictionary::DataRequest > ZipSoundsDictionary::getResource( string const &
|
|||
return new Dictionary::DataRequestInstant( false );
|
||||
}
|
||||
|
||||
void ZipSoundsDictionary::loadIcon() throw()
|
||||
void ZipSoundsDictionary::loadIcon() noexcept
|
||||
{
|
||||
if ( dictionaryIconLoaded )
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue