mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
style:fix style warning
This commit is contained in:
parent
4e0219adea
commit
e99431fa14
|
@ -35,8 +35,7 @@ class Writer
|
|||
size_t scratchPadOffset, scratchPadSize;
|
||||
|
||||
public:
|
||||
|
||||
Writer( File::Class & );
|
||||
explicit Writer( File::Class & );
|
||||
|
||||
/// Starts new block. Returns its address.
|
||||
uint32_t startNewBlock();
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
class WordListItemDelegate : public QStyledItemDelegate
|
||||
{
|
||||
public:
|
||||
WordListItemDelegate( QAbstractItemDelegate * delegate );
|
||||
explicit WordListItemDelegate( QAbstractItemDelegate * delegate );
|
||||
virtual void paint( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const;
|
||||
|
||||
private:
|
||||
|
|
|
@ -71,7 +71,7 @@ struct ArticleDom
|
|||
|
||||
/// Does the parse at construction. Refer to the 'root' member variable
|
||||
/// afterwards.
|
||||
ArticleDom( wstring const &, string const & dictName = string(),
|
||||
explicit ArticleDom( wstring const &, string const & dictName = string(),
|
||||
wstring const & headword_ = wstring() );
|
||||
|
||||
/// Root of DOM's tree
|
||||
|
@ -128,7 +128,7 @@ public:
|
|||
DEF_EX( exUnknownCodePage, "The .dsl file specified an unknown code page", Ex )
|
||||
DEF_EX( exEncodingError, "Encoding error", Ex ) // Should never happen really
|
||||
|
||||
DslScanner( string const & fileName ) ;
|
||||
explicit DslScanner( string const & fileName ) ;
|
||||
~DslScanner() noexcept;
|
||||
|
||||
/// Returns the detected encoding of this file.
|
||||
|
|
2
ex.hh
2
ex.hh
|
@ -30,7 +30,7 @@ virtual ~exName() noexcept {} };
|
|||
class exName: public exParent { \
|
||||
std::string value; \
|
||||
public: \
|
||||
exName( std::string const & value_ ): value( std::string( exDescription ) + " " + value_ ) {} \
|
||||
explicit exName( std::string const & value_ ): value( std::string( exDescription ) + " " + value_ ) {} \
|
||||
virtual const char * what() const noexcept { return value.c_str(); } \
|
||||
virtual ~exName() noexcept {} };
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ class TreeItem
|
|||
public:
|
||||
enum Type { Word, Folder, Root };
|
||||
|
||||
TreeItem( const QVariant &data, TreeItem *parent = 0, Type type_ = Word );
|
||||
explicit TreeItem( const QVariant &data, TreeItem *parent = 0, Type type_ = Word );
|
||||
~TreeItem();
|
||||
|
||||
void appendChild( TreeItem * child );
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
|
||||
/// Loads history from its file. If load fails, the result would be an empty
|
||||
/// history. The size parameter is same as in other constructor.
|
||||
History( Load, unsigned size = 20, unsigned maxItemLength = DEFAULT_MAX_HISTORY_ITEM_LENGTH );
|
||||
explicit History( Load, unsigned size = 20, unsigned maxItemLength = DEFAULT_MAX_HISTORY_ITEM_LENGTH );
|
||||
|
||||
/// Adds new item. The item is always added at the beginning of the list.
|
||||
/// If there was such an item already somewhere on the list, it gets removed
|
||||
|
|
Loading…
Reference in a new issue