generic: prepare for Katie changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-11-13 01:41:49 +02:00
parent 40f67005d8
commit 8b2eba7361
63 changed files with 139 additions and 136 deletions

View file

@ -370,7 +370,7 @@ QString KateCTagsView::currentWord( )
{
KTextEditor::View *kv = mainWindow()->activeView();
if (!kv) {
kDebug() << "no KTextEditor::View" << endl;
kDebug() << "no KTextEditor::View";
return QString();
}
@ -379,7 +379,7 @@ QString KateCTagsView::currentWord( )
}
if (!kv->cursorPosition().isValid()) {
kDebug() << "cursor not valid!" << endl;
kDebug() << "cursor not valid!";
return QString();
}
@ -404,7 +404,7 @@ QString KateCTagsView::currentWord( )
endPos++;
}
if (startPos == endPos) {
kDebug() << "no word found!" << endl;
kDebug() << "no word found!";
return QString();
}

View file

@ -510,7 +510,7 @@ KUrl KateBuildView::docUrl()
{
KTextEditor::View *kv = mainWindow()->activeView();
if (!kv) {
kDebug() << "no KTextEditor::View" << endl;
kDebug() << "no KTextEditor::View";
return KUrl();
}

View file

@ -30,6 +30,7 @@
#include <QFileInfo>
#include <QPlainTextEdit>
#include <QJsonDocument>
#include <QTextStream>
KateProject::KateProject ()
: QObject ()

View file

@ -30,6 +30,7 @@
// fdatasync
#include <kde_file.h>
#include <QTextStream>
#include <KSaveFile>
#include <kdeversion.h>

View file

@ -26,7 +26,7 @@
#include "ktexteditor/range.h"
#include <QObject>
#include <QtCore/qglobal.h>
#include <QVariant>
namespace Kate {

View file

@ -23,6 +23,7 @@
#include "katedocument.h"
#include <qprocess.h>
#include <qtextstream.h>
#include <kmessagebox.h>
#include <krun.h>
#include <klocale.h>

View file

@ -1875,8 +1875,8 @@ void KateViewInternal::updateCursor( const KTextEditor::Cursor& newCursor, bool
updateBracketMarks();
// It's efficient enough to just tag them both without checking to see if they're on the same view line
/* kdDebug()<<"oldDisplayCursor:"<<oldDisplayCursor<<endl;
kdDebug()<<"m_displayCursor:"<<m_displayCursor<<endl;*/
/* kDebug()<<"oldDisplayCursor:"<<oldDisplayCursor;
kDebug()<<"m_displayCursor:"<<m_displayCursor;*/
tagLine(oldDisplayCursor);
tagLine(m_displayCursor);
@ -2933,7 +2933,7 @@ void KateViewInternal::paintEvent(QPaintEvent *e)
continue;
//kDebug (13030) << "paint text: line: " << thisLine.line() << " viewLine " << thisLine.viewLine() << " x: " << unionRect.x() << " y: " << sy
// << " width: " << xEnd-xStart << " height: " << h << endl;
// << " width: " << xEnd-xStart << " height: " << h;
if (thisLine.viewLine())
paint.translate(QPoint(0, h * - thisLine.viewLine()));

View file

@ -40,6 +40,7 @@
#include <QFileInfo>
#include <QTextCodec>
#include <QTextStream>
#include <QDBusConnection>
#include <stdlib.h>

View file

@ -128,7 +128,7 @@ void KateDocManager::setSuppressOpeningErrorDialogs (bool suppress)
KTextEditor::Document *KateDocManager::createDoc (const KateDocumentInfo& docInfo)
{
kDebug()<<"createDoc"<<endl;
kDebug()<<"createDoc";
KTextEditor::Document *doc = (KTextEditor::Document *) m_editor->createDocument(this);

View file

@ -28,6 +28,7 @@
#include <KStartupInfo>
#include <kdebug.h>
#include <QTextStream>
#include <QTextCodec>
#include <QByteArray>
#include <QCoreApplication>

View file

@ -986,7 +986,7 @@ void KateMainWindow::restoreWindowConfig(const KConfigGroup &config)
void KateMainWindow::slotUpdateBottomViewBar()
{
//kDebug()<<"slotUpdateHorizontalViewBar()"<<endl;
//kDebug()<<"slotUpdateHorizontalViewBar()";
KTextEditor::View *view=m_viewManager->activeView();
BarState bs=m_bottomViewBarMapping[view];
if (bs.bar() && bs.state()) {
@ -996,7 +996,7 @@ void KateMainWindow::slotUpdateBottomViewBar()
} else {
QWidget *wid=m_bottomContainerStack->currentWidget();
if (wid) wid->hide();
//kDebug()<<wid<<"hiding container"<<endl;
//kDebug()<<wid<<"hiding container";
m_bottomViewBarContainer->hide();
}
}
@ -1004,7 +1004,7 @@ void KateMainWindow::slotUpdateBottomViewBar()
void KateMainWindow::slotUpdateTopViewBar()
{
//kDebug()<<"slotUpdateHorizontalViewBar()"<<endl;
//kDebug()<<"slotUpdateHorizontalViewBar()";
KTextEditor::View *view=m_viewManager->activeView();
BarState bs=m_topViewBarMapping[view];
if (bs.bar() && bs.state()) {
@ -1014,7 +1014,7 @@ void KateMainWindow::slotUpdateTopViewBar()
} else {
QWidget *wid=m_topContainerStack->currentWidget();
if (wid) wid->hide();
//kDebug()<<wid<<"hiding container"<<endl;
//kDebug()<<wid<<"hiding container";
m_topViewBarContainer->hide();
}
}

View file

@ -892,7 +892,7 @@ void KateFileTreeModel::updateBackgrounds(bool force)
double t = double(hc - it.value().view + 1) / double(hc);
m_brushes[it.key()] = QBrush(KColorUtils::mix(QPalette().color(QPalette::Base), shade, t));
// kdDebug()<<"m_brushes[it.key()]"<<it.key()<<m_brushes[it.key()];
// kDebug()<<"m_brushes[it.key()]"<<it.key()<<m_brushes[it.key()];
}
foreach(ProxyItem *item, m_brushes.keys())

View file

@ -170,7 +170,7 @@ KCMInit::KCMInit( KCmdLineArgs* args )
KService::Ptr serv = KService::serviceByStorageId( module );
if ( !serv || serv->library().isEmpty() ) {
kError() << i18n("Module %1 not found", module) << endl;
kError() << i18n("Module %1 not found", module);
return;
} else
list.append(serv);

View file

@ -95,7 +95,7 @@ bool KCMShell::isRunning()
return false; // We are the one and only.
kDebug() << "kcmshell4 with modules '" <<
m_serviceName << "' is already running." << endl;
m_serviceName << "' is already running.";
QDBusInterface iface(m_serviceName, "/KCModule/dialog", "org.kde.KCMShellMultiDialog");
QDBusReply<void> reply = iface.call("activate", kapp->startupId());

View file

@ -22,7 +22,7 @@ int main(int argc, char * argv[] )
int minor = XkbMinorVersion;
if (!XkbLibraryVersion(&major, &minor))
{
kError() << "Xlib XKB extension does not match" << endl;
kError() << "Xlib XKB extension does not match";
return 1;
}
kDebug() << "Xlib XKB extension major=" << major << " minor=" << minor;
@ -38,7 +38,7 @@ int main(int argc, char * argv[] )
if (!XkbQueryExtension(QX11Info::display(), &opcode_rtrn, &xkb_opcode, &error_rtrn,
&major, &minor))
{
kError() << "X server has not matching XKB extension" << endl;
kError() << "X server has not matching XKB extension";
return 1;
}
kDebug() << "X server XKB extension major=" << major << " minor=" << minor;

View file

@ -396,7 +396,7 @@ void JoyDevice::calcCorrection(int axis, int *min, int *center, int *max)
<< corr[axis].coef[0] << ", "
<< corr[axis].coef[1] << ", "
<< corr[axis].coef[2] << ", "
<< corr[axis].coef[3] << endl;
<< corr[axis].coef[3];
}
//--------------------------------------------------------------

View file

@ -176,12 +176,12 @@ void KCMDebug::readAreas()
const int space = data.indexOf(' ');
if (space == -1)
kError() << "No space:" << data << endl;
kError() << "No space:" << data;
bool longOK;
unsigned long number = data.left(space).toULong(&longOK);
if (!longOK)
kError() << "The first part wasn't a number : " << data << endl;
kError() << "The first part wasn't a number : " << data;
const QByteArray description = data.mid(space).simplified();
const QString descriptionStr = QString::fromLatin1(description.constData(), description.size());
@ -231,7 +231,7 @@ void KCMDebug::save()
QDBusMessage msg = QDBusMessage::createSignal("/", "org.kde.KDebug", "configChanged");
if (!QDBusConnection::sessionBus().send(msg))
{
kError() << "Unable to send D-BUS message" << endl;
kError() << "Unable to send D-BUS message";
}
emit changed( false );
}

View file

@ -59,7 +59,7 @@ namespace KDESu
QByteArray output = proc.readLine().simplified();
if (output.isEmpty()) {
kWarning() << "No X authentication info set for display " <<
d->m_Display << endl; return;
d->m_Display; return;
}
QList<QByteArray> lst = output.split(' ');
if (lst.count() != 3) {

View file

@ -114,7 +114,7 @@ int Widgets::textBox(QWidget *parent, int width, int height, const QString& titl
QFile f(file);
if (!f.open(QIODevice::ReadOnly))
{
kError() << i18n("kdialog: could not open file %1", file) << endl;
kError() << i18n("kdialog: could not open file %1", file);
return -1;
}
QTextStream s(&f);

View file

@ -58,7 +58,7 @@ ImportCommand* ImportCommand::importerFactory(KBookmarkModel* model, const QStri
{
if (type == "KDE2") return new KDE2ImportCommand(model);
else {
kError() << "ImportCommand::importerFactory() - invalid type (" << type << ")!" << endl;
kError() << "ImportCommand::importerFactory() - invalid type (" << type << ")!";
return 0;
}
}

View file

@ -53,7 +53,7 @@ int main( int argc, char**argv )
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if ( args->count() != 1 ) {
kError() << "No directory to scan for bookmarks specified." << endl;
kError() << "No directory to scan for bookmarks specified.";
return 1;
}
@ -78,7 +78,7 @@ int main( int argc, char**argv )
QString extraBookmarksDirName = args->arg( 0 );
QDir extraBookmarksDir( extraBookmarksDirName, "*.xml" );
if ( !extraBookmarksDir.isReadable() ) {
kError() << "Failed to read files in directory " << extraBookmarksDirName << endl;
kError() << "Failed to read files in directory " << extraBookmarksDirName;
return 1;
}

View file

@ -411,7 +411,7 @@ void KViewSearchLine::slotColumnsRemoved(const QModelIndex &, int first, int las
{
if(d->listView->modelColumn()>last)
kFatal()<<"Columns were removed, the modelColumn() doesn't exist anymore. "
"K4listViewSearchLine can't cope with that."<<endl;
"K4listViewSearchLine can't cope with that.";
updateSearch();
}
}

View file

@ -83,7 +83,7 @@ void TestLinkItr::slotJobResult(KJob *job)
const QString modDate = transfer->queryMetaData("modified");
if (transfer->error() != 0) {
kDebug()<<"***********"<<transfer->error()<<endl;
kDebug()<<"***********"<<transfer->error();
// can we assume that errorString will contain no entities?
QString err = transfer->errorString();
err.replace("\n", " ");

View file

@ -220,8 +220,7 @@ SelcAbilities KEBApp::getSelectionAbilities() const
<<"\nsa.root "<<selctionAbilities.root
<<"\nsa.multiSelect "<<selctionAbilities.multiSelect
<<"\nsa.singleSelect "<<selctionAbilities.singleSelect
<<"\nsa.deleteEnabled"<<selctionAbilities.deleteEnabled
<<endl;
<<"\nsa.deleteEnabled"<<selctionAbilities.deleteEnabled;
*/
return selctionAbilities;
}

View file

@ -73,7 +73,7 @@ static void calculateGrabMasks()
KKeyServer::modXScrollLock() |
KKeyServer::modXModeSwitch();
//kDebug() << "g_keyModMaskXAccel = " << g_keyModMaskXAccel
// << "g_keyModMaskXOnOrOff = " << g_keyModMaskXOnOrOff << endl;
// << "g_keyModMaskXOnOrOff = " << g_keyModMaskXOnOrOff;
}
//----------------------------------------------------
@ -97,13 +97,13 @@ bool KGlobalAccelImpl::grabKey(int keyQt, bool grab)
// Resolve the modifier
if (!KKeyServer::keyQtToModX(keyQt, &keyModX)) {
kDebug() << "keyQt (0x" << hex << keyQt << ") failed to resolve to x11 modifier";
kDebug() << "keyQt (0x" << QByteArray::number(keyQt, 16) << ") failed to resolve to x11 modifier";
return false;
}
// Resolve the X symbol
if (!KKeyServer::keyQtToSymX(keyQt, (int *)&keySymX) ) {
kDebug() << "keyQt (0x" << hex << keyQt << ") failed to resolve to x11 keycode";
kDebug() << "keyQt (0x" << QByteArray::number(keyQt, 16) << ") failed to resolve to x11 keycode";
return false;
}
@ -127,7 +127,7 @@ bool KGlobalAccelImpl::grabKey(int keyQt, bool grab)
keyModX &= g_keyModMaskXAccel; // Get rid of any non-relevant bits in mod
if (!keyCodeX) {
kDebug() << "keyQt (0x" << hex << keyQt << ") was resolved to x11 keycode 0";
kDebug() << "keyQt (0x" << QByteArray::number(keyQt, 16) << ") was resolved to x11 keycode 0";
return false;
}

View file

@ -47,7 +47,7 @@ KInfoListWidget::KInfoListWidget(const KComponentData &inst, const QString &_tit
KGlobal::locale()->insertCatalog("kcm_infobase");
kDebug() << "Constructing a KInfoListWidget..." << endl;
kDebug() << "Constructing a KInfoListWidget...";
//setButtons(KCModule::Help);
getlistbox = _getlistbox;
@ -75,7 +75,7 @@ KInfoListWidget::KInfoListWidget(const KComponentData &inst, const QString &_tit
}
void KInfoListWidget::load() {
kDebug() << "Loading KInfoListWidget..." << endl;
kDebug() << "Loading KInfoListWidget...";
//TODO Remove tree content before clear it
tree->clear();

View file

@ -75,7 +75,7 @@ bool Chart::drawChart(t_memsize total, const QList<t_memsize>& used, const QList
else
localheight = startline;
//kDebug() << "Count : " << count << " Percent : " << percent << "%" << " Localheight:" << localheight << endl;
//kDebug() << "Count : " << count << " Percent : " << percent << "%" << " Localheight:" << localheight;
if (localheight>0) {
QLinearGradient gradient(QPointF(1, startline), QPointF(width()-2, -localheight));

View file

@ -74,7 +74,7 @@ KCMPci::~KCMPci() {
}
void KCMPci::load() {
kDebug() << "Loading PCI information..." << endl;
kDebug() << "Loading PCI information...";
bool fallback = true;
#ifdef HAVE_PCIUTILS

View file

@ -70,7 +70,7 @@ int kdemain(int argc, char **argv)
if (argc != 4) {
kDebug(7123) << "Usage: kio_kamera protocol "
"domain-socket1 domain-socket2" << endl;
"domain-socket1 domain-socket2";
exit(-1);
}

View file

@ -262,7 +262,7 @@ bool RemoteImpl::renameFolders(const QString &src, const QString &dest,
bool overwrite) const
{
kDebug(1220) << "RemoteImpl::renameFolders: "
<< src << ", " << dest << endl;
<< src << ", " << dest;
QString directory;
if (findDirectory(src+".desktop", directory))
@ -290,7 +290,7 @@ bool RemoteImpl::changeFolderTarget(const QString &src, const QString &target,
bool overwrite) const
{
kDebug(1220) << "RemoteImpl::changeFolderTarget: "
<< src << ", " << target << endl;
<< src << ", " << target;
QString directory;
if (findDirectory(src+".desktop", directory))

View file

@ -111,7 +111,7 @@ int kdemain(int argc, char **argv)
if (argc != 4) {
kError(7115) << "Usage: kio_thumbnail protocol domain-socket1 domain-socket2" << endl;
kError(7115) << "Usage: kio_thumbnail protocol domain-socket1 domain-socket2";
exit(-1);
}

View file

@ -75,7 +75,7 @@ int main(int argc, char *argv[])
if ( !restoreArg.isEmpty() ) {
KUrl trashURL( restoreArg );
if ( !trashURL.isValid() || trashURL.protocol() != QLatin1String("trash") ) {
kError() << "Invalid URL for restoring a trashed file:" << trashURL << endl;
kError() << "Invalid URL for restoring a trashed file:" << trashURL;
return 1;
}
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
KIO::Job* job = KIO::special( trashURL, packedArgs );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
if ( !ok )
kError() << KIO::NetAccess::lastErrorString() << endl;
kError() << KIO::NetAccess::lastErrorString();
return 0;
}

View file

@ -187,7 +187,7 @@ void TestTrash::initTestCase()
m_otherPartitionTrashDir = trashdir;
m_otherPartitionId = *it;
kDebug() << "OK, found another writable partition: topDir=" << m_otherPartitionTopDir
<< " trashDir=" << m_otherPartitionTrashDir << " id=" << m_otherPartitionId << endl;
<< " trashDir=" << m_otherPartitionTrashDir << " id=" << m_otherPartitionId;
break;
}
}
@ -313,7 +313,7 @@ void TestTrash::trashFile( const QString& origFilePath, const QString& fileId )
QMap<QString, QString> metaData;
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
if ( !ok )
kError() << "moving " << u << " to trash failed with error " << KIO::NetAccess::lastError() << " " << KIO::NetAccess::lastErrorString() << endl;
kError() << "moving " << u << " to trash failed with error " << KIO::NetAccess::lastError() << " " << KIO::NetAccess::lastErrorString();
QVERIFY( ok );
if (origFilePath.startsWith(QLatin1String("/tmp")) && m_tmpIsWritablePartition) {
kDebug() << " TESTS SKIPPED";

View file

@ -73,7 +73,7 @@ TrashImpl::TrashImpl() :
if ( KDE_lstat( QFile::encodeName( QDir::homePath() ), &buff ) == 0 ) {
m_homeDevice = buff.st_dev;
} else {
kError() << "Should never happen: couldn't stat $HOME " << strerror( errno ) << endl;
kError() << "Should never happen: couldn't stat $HOME " << strerror( errno );
}
}

View file

@ -676,8 +676,7 @@ void Klipper::checkClipData( bool selectionMode )
kDebug() << "====== c h e c k C l i p D a t a ============================"
<< kBacktrace()
<< "====== c h e c k C l i p D a t a ============================"
<< endl;;
<< "====== c h e c k C l i p D a t a ============================";
if ( sender() ) {
@ -688,7 +687,7 @@ void Klipper::checkClipData( bool selectionMode )
kDebug() << "\nselectionMode=" << selectionMode
<< "\nowning (sel,cli)=(" << m_clip->ownsSelection() << "," << m_clip->ownsClipboard() << ")"
<< "\ntext=" << m_clip->text( selectionMode ? QClipboard::Selection : QClipboard::Clipboard) << endl;
<< "\ntext=" << m_clip->text( selectionMode ? QClipboard::Selection : QClipboard::Clipboard);
#endif
const QMimeData* data = m_clip->mimeData( selectionMode ? QClipboard::Selection : QClipboard::Clipboard );

View file

@ -21,6 +21,7 @@
#include "MainWindow.h"
// Qt
#include <QTextStream>
#include <QVBoxLayout>
#include <QMenuBar>

View file

@ -332,7 +332,7 @@ bool Part::openUrl(const KUrl& aUrl)
setUrl(aUrl);
emit setWindowCaption(aUrl.pathOrUrl());
//kdDebug() << "Set Window Caption to " << url.pathOrUrl();
//kDebug() << "Set Window Caption to " << url.pathOrUrl();
emit started(0);
if (aUrl.isLocalFile() /*&& b_openUrls*/) {

View file

@ -189,7 +189,7 @@ void DBusTest::testSessions()
QStringList prevEnv = listReply.value();
//for (int i = 0; i < prevEnv.size(); ++i)
// kDebug()<< prevEnv.at(i).toLocal8Bit().constData() << endl;
// kDebug()<< prevEnv.at(i).toLocal8Bit().constData();
voidReply = iface.call("setEnvironment", QStringList());
QVERIFY(voidReply.isValid());

View file

@ -132,7 +132,7 @@ int ResultScene::viewableHeight() const
void ResultScene::setQueryMatches(const QList<Plasma::QueryMatch> &m)
{
//kDebug() << "============================" << endl << "matches retrieved: " << m.count();
//kDebug() << "============================\n" << "matches retrieved: " << m.count();
/*
foreach (const Plasma::QueryMatch &match, m) {
kDebug() << " " << match.id() << match.text();

View file

@ -250,7 +250,7 @@ void QsDialog::setMatches(const QList<Plasma::QueryMatch> &matches)
temp.insert(match.id(), match);
// Do not create new MatchItems for existing matches when the query hasn't changed
if (!m_newQuery && m_matches.find(match.id()) != end) {
// kDebug() << "A match with id " << match.id() << " already exists." << endl;
// kDebug() << "A match with id " << match.id() << " already exists.";
QList<Plasma::QueryMatch> duplicates = m_matches.values(match.id());
bool exists = false;
foreach (const Plasma::QueryMatch &m, duplicates) {
@ -285,7 +285,7 @@ void QsDialog::setMatches(const QList<Plasma::QueryMatch> &matches)
items.append(m);
}
// kDebug() << "Add " << items.size() << " matches. Append?" << !m_newQuery << endl;
// kDebug() << "Add " << items.size() << " matches. Append?" << !m_newQuery;
m_matchView->setItems(items, true, !m_newQuery);
m_matches = temp;
// If new matches are obtained for the same query, append them to the list

View file

@ -244,7 +244,7 @@ void QsMatchView::setItems(const QList<MatchItem*> &items, bool popup, bool appe
setItemCount(d->m_items.size());
if (d->m_selectionMade) {
//kDebug() << "A user selection was already made" << endl;
//kDebug() << "A user selection was already made";
return;
}

View file

@ -504,16 +504,14 @@ void KSMServer::startKilling()
SmsDie( c->connection() );
}
kDebug( 1218 ) << " We killed all clients. We have now clients.count()=" <<
clients.count() << endl;
kDebug( 1218 ) << " We killed all clients. We have now clients.count()=" << clients.count();
completeKilling();
QTimer::singleShot( 10000, this, SLOT(timeoutQuit()) );
}
void KSMServer::completeKilling()
{
kDebug( 1218 ) << "KSMServer::completeKilling clients.count()=" <<
clients.count() << endl;
kDebug( 1218 ) << "KSMServer::completeKilling clients.count()=" << clients.count();
if( state == Killing ) {
bool wait = false;
foreach( KSMClient* c, clients ) {
@ -552,8 +550,7 @@ void KSMServer::killWM()
void KSMServer::completeKillingWM()
{
kDebug( 1218 ) << "KSMServer::completeKillingWM clients.count()=" <<
clients.count() << endl;
kDebug( 1218 ) << "KSMServer::completeKillingWM clients.count()=" << clients.count();
if( state == KillingWM ) {
if( clients.isEmpty())
killingCompleted();
@ -657,16 +654,14 @@ void KSMServer::startKillingSubSession()
SmsDie( c->connection() );
}
kDebug( 1218 ) << " We killed some clients. We have now clients.count()=" <<
clients.count() << endl;
kDebug( 1218 ) << " We killed some clients. We have now clients.count()=" << clients.count();
completeKillingSubSession();
QTimer::singleShot( 10000, this, SLOT(signalSubSessionClosed()) );
}
void KSMServer::completeKillingSubSession()
{
kDebug( 1218 ) << "KSMServer::completeKillingSubSession clients.count()=" <<
clients.count() << endl;
kDebug( 1218 ) << "KSMServer::completeKillingSubSession clients.count()=" << clients.count();
if( state == KillingSubSession ) {
bool wait = false;
foreach( KSMClient* c, clientsToKill ) {

View file

@ -24,6 +24,7 @@
#include <KColorUtils>
#include <KColorScheme>
#include <QtCore/QTextStream>
#include <QtGui/QPainter>
#include <QtGui/QBrush>
#include <QtGui/QPen>

View file

@ -67,8 +67,7 @@ bool BarGraph::addBar( const QString &footer )
bool BarGraph::removeBar( uint idx )
{
if ( idx >= bars ) {
kDebug(1215) << "BarGraph::removeBar: idx " << idx << " out of range "
<< bars << endl;
kDebug(1215) << "BarGraph::removeBar: idx " << idx << " out of range " << bars;
return false;
}

View file

@ -189,7 +189,7 @@ bool DancingBars::removeSensor( uint pos )
{
if ( pos >= mBars ) {
kDebug(1215) << "DancingBars::removeSensor: idx out of range ("
<< pos << ")" << endl;
<< pos << ")";
return false;
}
@ -228,7 +228,7 @@ void DancingBars::answerReceived( int id, const QList<QByteArray> &answerlist )
mSampleBuffer[ id ] = answer.toDouble();
if ( mFlags.testBit( id ) == true ) {
kDebug(1215) << "ERROR: DancingBars lost sample (" << mFlags
<< ", " << mBars << ")" << endl;
<< ", " << mBars << ")";
sensorError( id, true );
return;
}

View file

@ -444,7 +444,7 @@ bool FancyPlotter::removeBeam( uint beamId )
{
if ( beamId >= mBeams ) {
kDebug(1215) << "FancyPlotter::removeBeam: beamId out of range ("
<< beamId << ")" << endl;
<< beamId << ")";
return false;
}

View file

@ -157,7 +157,7 @@ bool WorkSheet::load( const QString &fileName )
int columnSpan = element.attribute( "columnSpan", "1" ).toInt();
if ( row < 0 || rowSpan < 0 || (row + rowSpan - 1) >= mRows || column < 0 || columnSpan < 0 || (column + columnSpan - 1) >= mColumns) {
kDebug(1215) << "Row or Column out of range (" << row << ", "
<< column << ")-(" << (row + rowSpan - 1) << ", " << (column + columnSpan - 1) << ")" << endl;
<< column << ")-(" << (row + rowSpan - 1) << ", " << (column + columnSpan - 1) << ")";
return false;
}
replaceDisplay( row, column, element, rowSpan, columnSpan );

View file

@ -416,7 +416,7 @@ QString KURISearchFilterEngine::formatResult( const QString& url,
void KURISearchFilterEngine::loadConfig()
{
kDebug(7023) << "Keywords Engine: Loading config..." << endl;
kDebug(7023) << "Keywords Engine: Loading config...";
// Load the config.
KConfig config( name() + QLatin1String("rc"), KConfig::NoGlobals );
@ -436,7 +436,7 @@ void KURISearchFilterEngine::loadConfig()
if (strchr (" :", m_cKeywordDelimiter) == 0)
m_cKeywordDelimiter = ':';
kDebug(7023) << "Web Shortcuts Enabled: " << m_bWebShortcutsEnabled << endl;
kDebug(7023) << "Default Shortcut: " << m_defaultWebShortcut << endl;
kDebug(7023) << "Keyword Delimiter: " << m_cKeywordDelimiter << endl;
kDebug(7023) << "Web Shortcuts Enabled: " << m_bWebShortcutsEnabled;
kDebug(7023) << "Default Shortcut: " << m_defaultWebShortcut;
kDebug(7023) << "Keyword Delimiter: " << m_cKeywordDelimiter;
}

View file

@ -76,11 +76,11 @@ static void filter( const char* u, const char * expectedResult = 0, int expected
case KUriFilterData::LocalFile:
case KUriFilterData::LocalDir:
kDebug() << "*** Result: Local Resource => '"
<< filterData->uri().toLocalFile() << "'" << endl;
<< filterData->uri().toLocalFile() << "'";
break;
case KUriFilterData::NetProtocol:
kDebug() << "*** Result: Network Resource => '"
<< filterData->uri().url() << "'" << endl;
<< filterData->uri().url() << "'";
break;
case KUriFilterData::Shell:
case KUriFilterData::Executable:

View file

@ -564,7 +564,7 @@ bool Workspace::allowClientActivation(const KWin::Client *c, xcb_timestamp_t tim
// level == 2 // normal
Time user_time = ac->userTime();
kDebug(1212) << "Activation, compared:" << c << ":" << time << ":" << user_time
<< ":" << (timestampCompare(time, user_time) >= 0) << endl;
<< ":" << (timestampCompare(time, user_time) >= 0);
return timestampCompare(time, user_time) >= 0; // time >= user_time
}
@ -596,7 +596,7 @@ bool Workspace::allowFullClientRaising(const KWin::Client *c, xcb_timestamp_t ti
return false;
xcb_timestamp_t user_time = ac->userTime();
kDebug(1212) << "Raising, compared:" << time << ":" << user_time
<< ":" << (timestampCompare(time, user_time) >= 0) << endl;
<< ":" << (timestampCompare(time, user_time) >= 0);
return timestampCompare(time, user_time) >= 0; // time >= user_time
}

View file

@ -110,7 +110,7 @@ void AuroraeFactory::initQML(const KConfigGroup &group)
QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(internalname);
KService::List offers = KServiceTypeTrader::self()->query("KWin/Decoration", constraint);
if (offers.isEmpty()) {
kError(1212) << "Couldn't find QML Decoration " << themeName << endl;
kError(1212) << "Couldn't find QML Decoration " << themeName;
// TODO: what to do in error case?
return;
}

View file

@ -1250,7 +1250,7 @@ QLibrary* EffectsHandlerImpl::findEffectLibrary(KService* service)
QLibrary* library = new QLibrary(service->library());
if (!library) {
kError(1212) << "couldn't open library for effect '" <<
service->name() << "'" << endl;
service->name() << "'";
return 0;
}
@ -1308,7 +1308,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
QString constraint = QString("[X-KDE-PluginInfo-Name] == '%1'").arg(internalname);
KService::List offers = KServiceTypeTrader::self()->query("KWin/Effect", constraint);
if (offers.isEmpty()) {
kError(1212) << "Couldn't find effect " << name << endl;
kError(1212) << "Couldn't find effect " << name;
return false;
}
KService::Ptr service = offers.first();
@ -1424,7 +1424,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
}
if (!create_func) {
kError(1212) << "EffectsHandler::loadEffect : effect_create function not found" << endl;
kError(1212) << "EffectsHandler::loadEffect : effect_create function not found";
library->unload();
return false;
}
@ -1437,7 +1437,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
KPluginInfo plugininfo(service);
foreach (const QString & depName, plugininfo.dependencies()) {
if (!loadEffect(depName)) {
kError(1212) << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl;
kError(1212) << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name;
library->unload();
return false;
}

View file

@ -1201,7 +1201,7 @@ void PresentWindowsEffect::calculateWindowTransformationsKompose(EffectWindowLis
//kDebug(1212) << "Window '" << window->caption() << "' gets moved to (" <<
// mWindowData[window].area.left() << "; " << mWindowData[window].area.right() <<
// "), scale: " << mWindowData[window].scale << endl;
// "), scale: " << mWindowData[window].scale;
}
if (maxRowHeights[i] - h > 0)
topOffset += maxRowHeights[i] - h;

View file

@ -71,15 +71,15 @@ bool performTransiencyCheck()
if ((*it1)->deleting)
continue;
if ((*it1)->in_group == NULL) {
kDebug(1212) << "TC: " << *it1 << " in not in a group" << endl;
kDebug(1212) << "TC: " << *it1 << " in not in a group";
ret = false;
} else if (!(*it1)->in_group->members().contains(*it1)) {
kDebug(1212) << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it" << endl;
kDebug(1212) << "TC: " << *it1 << " has a group " << (*it1)->in_group << " but group does not contain it";
ret = false;
}
if (!(*it1)->isTransient()) {
if (!(*it1)->mainClients().isEmpty()) {
kDebug(1212) << "TC: " << *it1 << " is not transient, has main clients:" << (*it1)->mainClients() << endl;
kDebug(1212) << "TC: " << *it1 << " is not transient, has main clients:" << (*it1)->mainClients();
ret = false;
}
} else {
@ -96,7 +96,7 @@ bool performTransiencyCheck()
continue;
}
if (!(*it2)->transients_list.contains(*it1)) {
kdDebug(1212) << "TC:" << *it1 << " has main client " << *it2 << " but main client does not have it as a transient" << endl;
kDebug(1212) << "TC:" << *it1 << " has main client " << *it2 << " but main client does not have it as a transient";
ret = false;
}
}
@ -114,7 +114,7 @@ bool performTransiencyCheck()
continue;
}
if (!(*it2)->mainClients().contains(*it1)) {
kdDebug(1212) << "TC:" << *it1 << " has transient " << *it2 << " but transient does not have it as a main client" << endl;
kDebug(1212) << "TC:" << *it1 << " has transient " << *it2 << " but transient does not have it as a main client";
ret = false;
}
}
@ -128,7 +128,7 @@ bool performTransiencyCheck()
it2 != members.constEnd();
++it2) {
if ((*it2)->in_group != *it1) {
kDebug(1212) << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group" << endl;
kDebug(1212) << "TC: Group " << *it1 << " contains client " << *it2 << " but client is not in that group";
ret = false;
}
}
@ -153,8 +153,8 @@ static void checkTransiency()
{
if (--transiencyCheck == 0) {
if (!performTransiencyCheck()) {
kDebug(1212) << "BT:" << transiencyCheckStartBt << endl;
kDebug(1212) << "CLIENT:" << transiencyCheckClient << endl;
kDebug(1212) << "BT:" << transiencyCheckStartBt;
kDebug(1212) << "CLIENT:" << transiencyCheckClient;
abort();
}
transiencyCheckNonExistent = false;
@ -790,7 +790,7 @@ xcb_window_t Client::verifyTransientFor(xcb_window_t new_transient_for, bool set
if (Client* new_transient_for_client = workspace()->findClient(WindowMatchPredicate(new_transient_for))) {
if (new_transient_for != before_search) {
kDebug(1212) << "Client " << this << " has WM_TRANSIENT_FOR poiting to non-toplevel window "
<< before_search << ", child of " << new_transient_for_client << ", adjusting." << endl;
<< before_search << ", child of " << new_transient_for_client << ", adjusting.";
new_property_value = new_transient_for; // also fix the property
}
} else

View file

@ -858,7 +858,7 @@ static bool areKeySymXsDepressed(bool bAll, const uint keySyms[], int nKeySyms)
kDebug(1212) << iKeySym << ": keySymX=0x" << QString::number(keySymX, 16)
<< " i=" << i << " mask=0x" << QString::number(mask, 16)
<< " keymap[i]=0x" << QString::number(keymap[i], 16) << endl;
<< " keymap[i]=0x" << QString::number(keymap[i], 16);
// If ALL keys passed need to be depressed,
if (bAll) {
@ -1370,7 +1370,7 @@ void TabBox::keyPress(int keyQt)
}
if (forward || backward) {
kDebug(1212) << "== " << forwardShortcut.toString()
<< " or " << backwardShortcut.toString() << endl;
<< " or " << backwardShortcut.toString();
KDEWalkThroughWindows(forward);
}
} else if (m_desktopGrab) {

View file

@ -173,7 +173,7 @@ void Extensions::init()
<< " fixes: 0x" << QString::number(m_fixes.version, 16)
<< " randr: 0x" << QString::number(m_randr.version, 16)
<< " sync: 0x" << QString::number(m_sync.version, 16)
<< " damage: 0x " << QString::number(m_damage.version, 16) << endl;
<< " damage: 0x " << QString::number(m_damage.version, 16);
}
void Extensions::extensionQueryReply(const xcb_query_extension_reply_t *extension, ExtensionData *dataToFill)

View file

@ -640,7 +640,8 @@ void KonqOperations::doDropFileCopy()
setOperation( job, LINK, m_destUrl );
KIO::FileUndoManager::self()->recordCopyJob(job);
break;
default : kError(1203) << "Unknown action " << (int)action << endl;
default :
kError(1203) << "Unknown action " << (int)action;
}
if (job) {
connect(job, SIGNAL(copyingDone(KIO::Job*,KUrl,KUrl,time_t,bool,bool)),

View file

@ -76,7 +76,7 @@ void SensorAgent::sendRequest( const QString &req, SensorClient *client, int id
#if SA_TRACE
kDebug(1215) << "-> " << req << "(" << mInputFIFO.count() << "/"
<< mProcessingFIFO.count() << ")" << endl;
<< mProcessingFIFO.count() << ")";
#endif
executeCommand();
}
@ -138,7 +138,7 @@ void SensorAgent::processAnswer( const char *buf, int buflen )
#if SA_TRACE
kDebug(1215) << "<= " << mAnswerBuffer
<< "(" << mInputFIFO.count() << "/"
<< mProcessingFIFO.count() << ")" << endl;
<< mProcessingFIFO.count() << ")";
#endif
if(buffer.at(i) == '\n')
i++;
@ -163,7 +163,7 @@ void SensorAgent::processAnswer( const char *buf, int buflen )
// remove pending request from FIFO
if ( mProcessingFIFO.isEmpty() ) {
kDebug(1215) << "ERROR: Received answer but have no pending "
<< "request!" << endl;
<< "request!";
mAnswerBuffer.clear();
continue;
}
@ -209,7 +209,7 @@ void SensorAgent::executeCommand()
#if SA_TRACE
kDebug(1215) << ">> " << req->request().toAscii() << "(" << mInputFIFO.count()
<< "/" << mProcessingFIFO.count() << ")" << endl;
<< "/" << mProcessingFIFO.count() << ")";
#endif
// send request to daemon
QString cmdWithNL = req->request() + '\n';

View file

@ -103,7 +103,7 @@ void SensorShellAgent::errMsgRcvd( )
QString buf = QString::fromUtf8( buffer );
kDebug(1215) << "SensorShellAgent: Warning, received text over stderr!"
<< endl << buf << endl;
<< '\n' << buf;
}
void SensorShellAgent::daemonExited( int exitCode, QProcess::ExitStatus exitStatus )

View file

@ -22,6 +22,7 @@
#include <iostream>
#include <QFile>
#include <QTextStream>
#include <QtCore/qmetaobject.h>
#include <KDebug>

View file

@ -20,6 +20,7 @@
#include "supportinformation.h"
#include <QBuffer>
#include <Plasma/Applet>
#include <Plasma/Containment>
#include <Plasma/Corona>
@ -31,14 +32,14 @@
QString SupportInformation::generateSupportInformation(Plasma::Corona *corona)
{
QString infoString;
QDebug stream(&infoString);
QBuffer infoBuffer;
QDebug stream(&infoBuffer);
SupportInformation info(stream);
info.addHeader();;
info.addHeader();
info.addInformationForCorona(corona);
return infoString;
return QString(infoBuffer.data());
}
SupportInformation::SupportInformation(const QDebug &outputStream) :
@ -48,20 +49,20 @@ SupportInformation::SupportInformation(const QDebug &outputStream) :
void SupportInformation::addHeader()
{
m_stream << "Plasma-desktop Support Information:" << endl
<< "The following information should be used when requesting support on e.g. http://forum.kde.org" << endl
<< "It provides information about the currently running instance and which applets are used." << endl
m_stream << "Plasma-desktop Support Information:\n"
<< "The following information should be used when requesting support on e.g. http://forum.kde.org\n"
<< "It provides information about the currently running instance and which applets are used.\n"
<< "Please post the information provided underneath this introductory text to a paste bin service "
<< "like http://paste.kde.org instead of pasting into support threads." << endl << endl;
<< "like http://paste.kde.org instead of pasting into support threads.\n\n";
m_stream << "Version" << endl;
m_stream << "=======" << endl;
m_stream << "KDE SC version (runtime): " << endl;
m_stream << KDE::versionString() << endl;
m_stream << "KDE SC version (compile): " << endl;
m_stream << KDE_VERSION_STRING << endl;
m_stream << "Qt Version: " << endl;
m_stream << qVersion() << endl;
m_stream << "Version\n";
m_stream << "=======\n";
m_stream << "KDE SC version (runtime):\n";
m_stream << KDE::versionString() << '\n';
m_stream << "KDE SC version (compile):\n";
m_stream << KDE_VERSION_STRING << '\n';
m_stream << "Katie Version:\n";
m_stream << qVersion() << '\n';
addSeperator();
}
@ -90,31 +91,31 @@ void SupportInformation::addInformationForApplet(Plasma::Applet *applet)
} else {
m_stream << "Applet - ";
}
m_stream << applet->name() << ':' << endl;
m_stream << applet->name() << ":\n";
m_stream << "Plugin Name: " << applet->pluginName() << endl;
m_stream << "Category: " << applet->category() << endl;
m_stream << "Plugin Name: " << applet->pluginName() << '\n';
m_stream << "Category: " << applet->category() << '\n';
if (applet->package()) {
m_stream << "API: " << applet->package()->metadata().implementationApi() << endl;
m_stream << "Type: " << applet->package()->metadata().type() << endl;
m_stream << "Version: " << applet->package()->metadata().version() << endl;
m_stream << "Author: " << applet->package()->metadata().author() << endl;
m_stream << "API: " << applet->package()->metadata().implementationApi() << '\n';
m_stream << "Type: " << applet->package()->metadata().type() << '\n';
m_stream << "Version: " << applet->package()->metadata().version() << '\n';
m_stream << "Author: " << applet->package()->metadata().author() << '\n';
}
//runtime info
m_stream << "Failed To Launch: " << applet->hasFailedToLaunch() << endl;
m_stream << "ScreenRect: " << applet->screenRect() << endl;
m_stream << "FormFactor: " << applet->formFactor() << endl;
m_stream << "Failed To Launch: " << applet->hasFailedToLaunch() << '\n';
m_stream << "ScreenRect: " << applet->screenRect() << '\n';
m_stream << "FormFactor: " << applet->formFactor() << '\n';
m_stream << "Config Group Name: " << applet->config().name() << endl;
m_stream << "Config Group Name: " << applet->config().name() << '\n';
m_stream << endl; //insert a blank line
m_stream << '\n'; //insert a blank line
}
void SupportInformation::addSeperator()
{
m_stream << endl << "=========" << endl;
m_stream << '\n' << "=========" << '\n';
}

View file

@ -29,6 +29,7 @@
#include <KColorDialog>
#include <KDebug>
#include <QtCore/QHash>
#include <QtCore/QTextStream>
#include <QtCore/QTimer>
#include <QtGui/QFileDialog>
#include <QtGui/QColorDialog>

View file

@ -112,7 +112,7 @@ int MacroExpander::expandEscapedMacro(const QString &str, int pos, QStringList &
ret << m_device.as<Solid::StorageAccess>()->filePath();
} else {
kWarning() << "DeviceServiceAction::execute: " << m_device.udi()
<< " is not a StorageAccess device" << endl;
<< " is not a StorageAccess device";
}
break;
case 'd': // Device node
@ -121,7 +121,7 @@ int MacroExpander::expandEscapedMacro(const QString &str, int pos, QStringList &
ret << m_device.as<Solid::Block>()->device();
} else {
kWarning() << "DeviceServiceAction::execute: " << m_device.udi()
<< " is not a Block device" << endl;
<< " is not a Block device";
}
break;
case 'i': // UDI