Minor code improvements
This commit is contained in:
parent
fc92115597
commit
8a0bb2046d
|
@ -23,9 +23,9 @@ void DbQuery::setDialogLevel(const int new_level ) noexcept
|
|||
this->dialog_level = new_level;
|
||||
}
|
||||
|
||||
void DbQuery::setDbPath( const std::string& path ) noexcept
|
||||
void DbQuery::setDbPath( std::string&& path ) noexcept
|
||||
{
|
||||
this->db_path = path;
|
||||
this->db_path = std::move(path);
|
||||
this->db_name = QString::fromStdString( this->db_path.substr( this->db_path.find_last_of( '/' ) + 1ul ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
/*!
|
||||
\see Crapview::setDbPath()
|
||||
*/
|
||||
void setDbPath( const std::string& path ) noexcept;
|
||||
void setDbPath( std::string&& path ) noexcept;
|
||||
|
||||
/*const std::string getDbPath( const int web_server );*/
|
||||
|
||||
|
|
|
@ -149,11 +149,9 @@ QString printableDate( const int year, const int month, const int day ) noexcept
|
|||
|
||||
QString printableBool( const int value ) noexcept
|
||||
{
|
||||
if ( value == 0 ) {
|
||||
return TR::tr( BOOLS__FALSE.c_str() );
|
||||
} else {
|
||||
return TR::tr( BOOLS__TRUE.c_str() );
|
||||
}
|
||||
return value == 0
|
||||
? TR::tr( BOOLS__FALSE.c_str() )
|
||||
: TR::tr( BOOLS__TRUE.c_str() );
|
||||
}
|
||||
|
||||
} // namespace PrintSec
|
||||
|
|
Loading…
Reference in a new issue