Commit 7808784d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove endl at the end of qDebug

parent 3ffea996
......@@ -64,7 +64,7 @@ DictionaryUpdateManager::DictionaryUpdateManager( Kiten *parent )
void DictionaryUpdateManager::checkForUpdates()
{
qDebug() << "Checking for EDICT & KANJIDIC updates." << endl;
qDebug() << "Checking for EDICT & KANJIDIC updates.";
// Download the information file we need to check
// whether or not an update to our dictionaries is necessary.
KIO::StoredTransferJob *job = KIO::storedGet( QUrl( INFO_URL ) );
......@@ -101,7 +101,7 @@ void DictionaryUpdateManager::checkInfoFile( KJob *job )
if( ! tempFile.open() )
{
KMessageBox::sorry( nullptr, i18n( "Update canceled.\nCould not open file." ) );
qDebug() << "Could not open tempFile." << endl;
qDebug() << "Could not open tempFile.";
tempFile.deleteLater();
job->deleteLater();
return;
......@@ -136,7 +136,7 @@ void DictionaryUpdateManager::checkInfoFile( KJob *job )
{
QString filePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral( "kiten/" ) + dict.toLower() );
QFile file( filePath );
qDebug() << "Local dictionary path:" << file.fileName() << endl;
qDebug() << "Local dictionary path:" << file.fileName();
// Get the creation date for this dictionary.
QDate localFileDate = getFileDate( file );
......@@ -145,14 +145,14 @@ void DictionaryUpdateManager::checkInfoFile( KJob *job )
{
// Add it to our 'failed to udate' list.
_failed.append( dict.toUpper() );
qDebug() << "Failed (invalid date):" << dict.toUpper() << endl;
qDebug() << "Failed (invalid date):" << dict.toUpper();
continue;
}
else if( localFileDate == webFileDate )
{
// Add it to our 'up to date' list.
_succeeded.append( dict.toUpper() );
qDebug() << "Success (up to date):" << dict.toUpper() << endl;
qDebug() << "Success (up to date):" << dict.toUpper();
continue;
}
else
......@@ -183,7 +183,7 @@ void DictionaryUpdateManager::checkInfoFile( KJob *job )
void DictionaryUpdateManager::downloadDictionary( const QString &url )
{
qDebug() << "Download started!" << endl;
qDebug() << "Download started!";
// Download dictionary.
KIO::StoredTransferJob *dictionaryJob = KIO::storedGet( QUrl( url ) );
connect(dictionaryJob, &KIO::StoredTransferJob::result, this, &DictionaryUpdateManager::installDictionary);
......@@ -193,7 +193,7 @@ QDate DictionaryUpdateManager::getFileDate( QFile &file )
{
if( ! file.open( QIODevice::ReadOnly | QIODevice::Text ) )
{
qDebug() << "Could not open " << file.fileName() << endl;
qDebug() << "Could not open " << file.fileName();
return QDate();
}
......@@ -228,7 +228,7 @@ QDate DictionaryUpdateManager::getFileDate( QFile &file )
file.close();
qDebug() << "Date found:" << dateSection << "(" << file.fileName() << ")" << endl;
qDebug() << "Date found:" << dateSection << "(" << file.fileName() << ")";
return QDate( year, month, day );
}
......@@ -248,7 +248,7 @@ void DictionaryUpdateManager::installDictionary( KJob *job )
QTemporaryFile compressedFile;
if( ! compressedFile.open() )
{
qDebug() << "Could not create the downloaded .gz file." << endl;
qDebug() << "Could not create the downloaded .gz file.";
_failed.append( url.contains( EDICT ) ? EDICT : KANJIDIC );
job->deleteLater();
checkIfUpdateFinished();
......@@ -258,15 +258,15 @@ void DictionaryUpdateManager::installDictionary( KJob *job )
compressedFile.write( data );
compressedFile.close();
qDebug() << "Dictionary download finished!" << endl;
qDebug() << "Extracting dictionary..." << endl;
qDebug() << "Dictionary download finished!";
qDebug() << "Extracting dictionary...";
// Extract the GZIP file.
//QIODevice *device = KFilterDev::deviceForFile( compressedFile.fileName(), "application/x-gzip" );
KCompressionDevice *device = new KCompressionDevice(compressedFile.fileName(), KCompressionDevice::GZip);
if( ! device->open( QIODevice::ReadOnly ) )
{
qDebug() << "Could not extract the dictionary file." << endl;
qDebug() << "Could not extract the dictionary file.";
_failed.append( url.contains( EDICT ) ? EDICT : KANJIDIC );
delete device;
job->deleteLater();
......@@ -287,7 +287,7 @@ void DictionaryUpdateManager::installDictionary( KJob *job )
QFile dictionary( dictPath + fileName);
if( ! dictionary.open( QIODevice::WriteOnly ) )
{
qDebug() << "Could not create the new dictionary file." << endl;
qDebug() << "Could not create the new dictionary file.";
_failed.append( fileName.toUpper() );
device->close();
delete device;
......@@ -306,7 +306,7 @@ void DictionaryUpdateManager::installDictionary( KJob *job )
// Check if we finished updating.
checkIfUpdateFinished();
qDebug() << "Successfully installed at:" << dictionary.fileName() << endl;
qDebug() << "Successfully installed at:" << dictionary.fileName();
}
void DictionaryUpdateManager::showUpdateResults()
......
......@@ -669,7 +669,7 @@ void Kiten::loadDictionaries()
//Update general options for the display manager (sorting by dict, etc)
_dictionaryManager.loadSettings( *_config->config() );
qDebug() << "Dictionaries loaded!" << endl;
qDebug() << "Dictionaries loaded!";
}
/**
......
......@@ -79,7 +79,7 @@ void KanjiBrowser::loadKanji()
return;
}
qDebug() << "Loading kanji..." << endl;
qDebug() << "Loading kanji...";
QString dictionary = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kiten/kanjidic"));
_dictFileKanjidic = new DictFileKanjidic();
......@@ -131,8 +131,8 @@ void KanjiBrowser::loadKanji()
// Sort them.
std::sort(gradeList.begin(), gradeList.end());
std::sort(strokeList.begin(), strokeList.end());
qDebug() << "Max. grade:" << gradeList.last() << endl;
qDebug() << "Max. stroke count:" << strokeList.last() << endl;
qDebug() << "Max. grade:" << gradeList.last();
qDebug() << "Max. stroke count:" << strokeList.last();
// Finally setup the view.
_view->setupView( this, kanjiList, gradeList, strokeList );
......
......@@ -229,8 +229,8 @@ void KanjiBrowserView::setupView( KanjiBrowser *parent
{
if( kanji.isEmpty() || kanjiGrades.isEmpty() || strokeCount.isEmpty() )
{
qDebug() << "One or more of our lists are empty (kanji, grades, strokes)." << endl;
qDebug() << "Could not load the view properly." << endl;
qDebug() << "One or more of our lists are empty (kanji, grades, strokes).";
qDebug() << "Could not load the view properly.";
KMessageBox::error( this, i18n( "Could not load the necessary kanji information." ) );
return;
}
......@@ -282,7 +282,7 @@ void KanjiBrowserView::setupView( KanjiBrowser *parent
_strokes->setCurrentIndex( 1 );
_strokes->setCurrentIndex( NoStrokeLimit );
qDebug() << "Initial setup succeeded!" << endl;
qDebug() << "Initial setup succeeded!";
}
void KanjiBrowserView::showKanjiInformation( const EntryKanjidic *kanji )
......
......@@ -54,7 +54,7 @@ QVector<QString> LinearEdictFile::findMatches( const QString &searchString ) con
bool LinearEdictFile::loadFile( const QString& filename )
{
qDebug() << "Loading edict from " << filename << endl;
qDebug() << "Loading edict from " << filename;
//if already loaded
if ( ! m_edict.isEmpty() )
......
......@@ -107,7 +107,7 @@ EntryList* DictFileKanjidic::doSearch( const DictQuery &query )
return new EntryList();
}
qDebug() << "Search from:" << getName() << endl;
qDebug() << "Search from:" << getName();
QString searchQuery = query.getWord();
if( searchQuery.length() == 0 )
{
......@@ -174,7 +174,7 @@ bool DictFileKanjidic::loadDictionary( const QString &file, const QString &name
return false;
}
qDebug() << "Loading kanjidic from:" << file << endl;
qDebug() << "Loading kanjidic from:" << file;
QTextStream fileStream( &dictionary );
fileStream.setCodec( QTextCodec::codecForName( "eucJP" ) );
......
......@@ -156,7 +156,7 @@ EntryList *DictionaryManager::doSearch( const DictQuery &query ) const
// None specified, search all
foreach( DictFile *it, d->dictManagers )
{
qDebug() << "Searching in " << it->getName() << "dictionary." << endl;
qDebug() << "Searching in " << it->getName() << "dictionary.";
EntryList *temp = it->doSearch( query );
if( temp )
{
......
......@@ -66,7 +66,7 @@ RadSelect::RadSelect()
if( ! QDBusConnection::sessionBus().isConnected() )
{
qDebug() << "Session Bus not found!!" << endl;
qDebug() << "Session Bus not found!!";
m_dbusInterface = nullptr;
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment