mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-21 00:12:06 +02:00
Rename updateIndex to dryRun to better reflect its use
This commit is contained in:
parent
ec154de61f
commit
7b096db2fd
@ -138,7 +138,7 @@ MusicScanner::MusicScanner( MusicScanner::ScanMode scanMode, const QStringList&
|
||||
, m_paths( paths )
|
||||
, m_scanned( 0 )
|
||||
, m_showProgress( true )
|
||||
, m_updateIndex( true )
|
||||
, m_dryRun( false )
|
||||
, m_verbose( false )
|
||||
, m_cmdQueue( 0 )
|
||||
, m_batchsize( bs )
|
||||
@ -177,16 +177,16 @@ MusicScanner::showingProgress()
|
||||
|
||||
|
||||
void
|
||||
MusicScanner::updateIndex( bool _updateIndex )
|
||||
MusicScanner::setDryRun( bool _dryRun )
|
||||
{
|
||||
m_updateIndex = _updateIndex;
|
||||
m_dryRun = _dryRun;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
MusicScanner::updatingIndex()
|
||||
MusicScanner::dryRun()
|
||||
{
|
||||
return m_updateIndex;
|
||||
return m_dryRun;
|
||||
}
|
||||
|
||||
|
||||
@ -295,7 +295,7 @@ MusicScanner::postOps()
|
||||
|
||||
if ( m_filesToDelete.length() || m_scannedfiles.length() )
|
||||
{
|
||||
if ( m_updateIndex )
|
||||
if ( !m_dryRun )
|
||||
{
|
||||
SourceList::instance()->getLocal()->updateIndexWhenSynced();
|
||||
commitBatch( m_scannedfiles, m_filesToDelete );
|
||||
|
@ -111,10 +111,12 @@ public:
|
||||
bool showingProgress();
|
||||
|
||||
/**
|
||||
* Specify if the search index should be updated or if we only want a dry run.
|
||||
* Specify if we want a dry run, i.e. not change any of the internal data stores.
|
||||
*
|
||||
* This is useful for testing if the scanner works (while Tomahawk is running).
|
||||
*/
|
||||
void updateIndex( bool _updateIndex );
|
||||
bool updatingIndex();
|
||||
void setDryRun( bool _dryRun );
|
||||
bool dryRun();
|
||||
|
||||
/**
|
||||
* Adjust the verbosity of logging.
|
||||
@ -151,7 +153,7 @@ private:
|
||||
unsigned int m_scanned;
|
||||
unsigned int m_skipped;
|
||||
bool m_showProgress;
|
||||
bool m_updateIndex;
|
||||
bool m_dryRun;
|
||||
bool m_verbose;
|
||||
|
||||
QList<QString> m_skippedFiles;
|
||||
|
@ -48,7 +48,7 @@ main( int argc, char* argv[] )
|
||||
|
||||
// We want a dry-run of the scanner and not update any internal data.
|
||||
scanner.showProgress( false );
|
||||
scanner.updateIndex( false );
|
||||
scanner.setDryRun( true );
|
||||
scanner.setVerbose( true );
|
||||
|
||||
// Start the MusicScanner in its own thread
|
||||
|
Loading…
x
Reference in New Issue
Block a user