Commit 1a840d3b authored by David Faure's avatar David Faure

finish porting away from kde4support - we were still using some of its headers

parent 494aec47
......@@ -22,7 +22,6 @@
#include <QDataStream>
#include <QDir>
#include <kdebug.h>
void KateBtDatabase::loadFromFile(const QString& url)
{
......@@ -32,7 +31,7 @@ void KateBtDatabase::loadFromFile(const QString& url)
QDataStream ds(&file);
ds >> db;
}
kDebug() << "Number of entries in the backtrace database:" << db.size();
qDebug() << "Number of entries in the backtrace database:" << db.size();
}
void KateBtDatabase::saveToFile(const QString& url) const
......
......@@ -20,7 +20,6 @@
#include "btdatabase.h"
#include <QDir>
#include <kdebug.h>
BtFileIndexer::BtFileIndexer(KateBtDatabase* database)
: QThread()
......@@ -46,13 +45,13 @@ void BtFileIndexer::setSearchPaths(const QStringList& urls)
void BtFileIndexer::setFilter(const QStringList& fileFilter)
{
filter = fileFilter;
kDebug() << filter;
qDebug() << filter;
}
void BtFileIndexer::run()
{
if (filter.size() == 0) {
kDebug() << "Filter is empty. Aborting.";
qDebug() << "Filter is empty. Aborting.";
return;
}
......@@ -61,7 +60,7 @@ void BtFileIndexer::run()
if (cancelAsap) { break; }
indexFiles(searchPaths[i]);
}
kDebug() << QString("Backtrace file database contains %1 files").arg(db->size());
qDebug() << QString("Backtrace file database contains %1 files").arg(db->size());
}
void BtFileIndexer::cancel()
......
......@@ -20,7 +20,6 @@
#include <QStringList>
#include <kdebug.h>
static QString eolDelimiter(const QString& str)
{
......@@ -145,7 +144,7 @@ static BtInfo parseBtLine(const QString& line)
return info;
}
kDebug() << "Unknown backtrace line:" << line;
qDebug() << "Unknown backtrace line:" << line;
BtInfo info;
info.type = BtInfo::Invalid;
......
......@@ -23,14 +23,13 @@
#include "btparser.h"
#include "btfileindexer.h"
#include <klocale.h> // i18n
#include <klocalizedstring.h> // i18n
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <kaboutdata.h>
#include <KStandardDirs>
#include <ktexteditor/view.h>
#include <ksharedconfig.h>
#include <kdebug.h>
#include <klineedit.h>
#include <kfiledialog.h>
......@@ -263,7 +262,7 @@ void KateBtBrowserPluginView::itemActivated(QTreeWidgetItem* item, int column)
if (idx != -1) {
// file is of correct form
} else {
kDebug() << "file patter did not match:" << file;
qDebug() << "file patter did not match:" << file;
setStatus(i18n("File not found: %1", file));
return;
}
......
......@@ -131,7 +131,7 @@ void CloseConfirmDialog::updateDocsList()
{
KateDocItem* item = static_cast<KateDocItem*>(*it);
m_docs.removeAll(item->document);
kDebug() << "do not close the file " << item->document->url().prettyUrl();
qDebug() << "do not close the file " << item->document->url().prettyUrl();
}
}
......
......@@ -231,7 +231,7 @@ void CloseExceptPluginView::updateMenu()
const QList<KTextEditor::Document*>& docs = m_plugin->application()->documentManager()->documents();
if (docs.size() < 2)
{
kDebug() << "No docs r (or the only) opened right now --> disable menu";
qDebug() << "No docs r (or the only) opened right now --> disable menu";
m_except_menu->setEnabled(false);
m_except_menu->addSeparator();
m_like_menu->setEnabled(false);
......@@ -252,7 +252,7 @@ void CloseExceptPluginView::updateMenu()
doc_paths.insert(document->url().upUrl().path());
}
paths_set_type paths = doc_paths;
kDebug() << "stage #1: Collected" << paths.size() << "paths and" << masks.size() << "masks";
qDebug() << "stage #1: Collected" << paths.size() << "paths and" << masks.size() << "masks";
// Add common paths to the collection
for (paths_set_type::iterator it = doc_paths.begin(), last = doc_paths.end(); it != last; ++it)
{
......@@ -273,7 +273,7 @@ void CloseExceptPluginView::updateMenu()
}
}
}
kDebug() << "stage #2: Collected" << paths.size() << "paths and" << masks.size() << "masks";
qDebug() << "stage #2: Collected" << paths.size() << "paths and" << masks.size() << "masks";
//
m_except_mapper = updateMenu(paths, masks, m_except_actions, m_except_menu);
m_like_mapper = updateMenu(paths, masks, m_like_actions, m_like_menu);
......@@ -291,7 +291,7 @@ void CloseExceptPluginView::close(const QString& item, const bool close_if_match
const bool is_path = item[0] != '*';
const QString mask = is_path ? item.left(item.size() - 1) : item;
kDebug() << "Going to close items [" << close_if_match << "/" << is_path << "]: " << mask;
qDebug() << "Going to close items [" << close_if_match << "/" << is_path << "]: " << mask;
QList<KTextEditor::Document*> docs2close;
const QList<KTextEditor::Document*>& docs = m_plugin->application()->documentManager()->documents();
......@@ -305,7 +305,7 @@ void CloseExceptPluginView::close(const QString& item, const bool close_if_match
;
if (match == close_if_match)
{
kDebug() << "*** Will close: " << document->url();
qDebug() << "*** Will close: " << document->url();
docs2close.push_back(document);
}
}
......
......@@ -23,7 +23,7 @@
#include <kaboutdata.h>
#include <kaction.h>
#include <QAction>
#include <kactionmenu.h>
#include <kactioncollection.h>
#include <kcombobox.h>
......@@ -31,12 +31,11 @@
#include <kdialog.h>
#include <kdirwatch.h>
#include <kfiledialog.h>
#include <kglobal.h>
#include <kicondialog.h>
#include <kiconloader.h>
#include <kio/netaccess.h>
#include <klineedit.h>
#include <klocale.h>
#include <klocalizedstring.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <ktemporaryfile.h>
......@@ -67,7 +66,6 @@
#include <stdlib.h>
#include <kdebug.h>
#include <ktexteditor/templateinterface.h>
#include <krecentfilesaction.h>
......@@ -170,7 +168,7 @@ KateFileTemplates::KateFileTemplates( QObject* parent, const QList<QVariant> &du
*/
void KateFileTemplates::updateTemplateDirs(const QString &d)
{
kDebug()<<"updateTemplateDirs called with arg "<<d;
qDebug()<<"updateTemplateDirs called with arg "<<d;
const QStringList templates = KGlobal::dirs()->findAllResources(
"data","kate/plugins/katefiletemplates/templates/*.katetemplate",
......@@ -281,7 +279,7 @@ void KateFileTemplates::refreshMenu( KMenu *menu )
QMenu *sm=menu->addMenu(m_templates[ i ]->group);
submenus.insert( m_templates[ i ]->group, sm );
}
// kDebug()<<"=== ICON: '"<<m_templates[ i ].icon<<"'";
// qDebug()<<"=== ICON: '"<<m_templates[ i ].icon<<"'";
QMenu *sm=submenus[m_templates.at(i)->group];
QAction *a;
if ( ! m_templates[ i ]->icon.isEmpty() )
......@@ -335,7 +333,7 @@ void KateFileTemplates::slotAny()
void KateFileTemplates::slotOpenTemplate()
{
int index=static_cast<QAction*>(sender())->data().toInt();
kDebug()<<"slotOpenTemplate( "<<index<<" )";
qDebug()<<"slotOpenTemplate( "<<index<<" )";
if ( index < 0 || index > m_templates.count() ) return;
slotOpenTemplate( KUrl( m_templates.at( index )->filename ) );
}
......@@ -345,7 +343,7 @@ void KateFileTemplates::slotOpenTemplate( const KUrl &url )
// check if the file can be opened
QString tmpfile;
QString filename = url.fileName();
kDebug()<<"file: "<<filename;
qDebug()<<"file: "<<filename;
if ( KIO::NetAccess::download( url, tmpfile, 0L ) )
{
bool isTemplate ( filename.endsWith( ".katetemplate" ) );
......@@ -396,10 +394,10 @@ void KateFileTemplates::slotOpenTemplate( const KUrl &url )
{
QRegExp reHl( "\\bhighlight\\s*=\\s*(.+)(?:\\s+\\w+\\s*=|$)", Qt::CaseInsensitive );
reHl.setMinimal( true );
kDebug()<<"looking for a hl mode";
qDebug()<<"looking for a hl mode";
if ( reHl.indexIn( tmp ) > -1 )
{
kDebug()<<"looking for a hl mode -- "<<reHl.cap();
qDebug()<<"looking for a hl mode -- "<<reHl.cap();
// this is overly complex, too bad the interface is
// not providing a reasonable method..
QString hlmode = reHl.cap( 1 );
......@@ -840,7 +838,7 @@ void KateTemplateWizard::slotStateChanged()
case 0: // origin
{
int _t = bgOrigin->checkedId();
kDebug()<<"selected button:"<<_t;
qDebug()<<"selected button:"<<_t;
sane = ( _t == 1 ||
( _t == 2 && ! urOrigin->url().isEmpty() ) ||
( _t == 3 && ! btnTmpl->text().isEmpty() ) );
......@@ -873,7 +871,7 @@ void KateTemplateWizard::slotStateChanged()
default:
break;
}
kDebug()<<"enabling 'next' button:"<<sane;
qDebug()<<"enabling 'next' button:"<<sane;
button( QWizard::NextButton )->setEnabled( sane );
}
......@@ -957,7 +955,7 @@ void KateTemplateWizard::accept()
// 2) If a file or template is chosen, open that. and fill the data into a string
int toid = bgOrigin->checkedId(); // 1 = blank, 2 = file, 3 = template
kDebug()<<"=== create template: origin type "<<toid;
qDebug()<<"=== create template: origin type "<<toid;
if ( toid > 1 )
{
KUrl u;
......@@ -1029,7 +1027,7 @@ void KateTemplateWizard::accept()
QFile file( templateUrl.toLocalFile() );
if ( file.open(QIODevice::WriteOnly) )
{
kDebug()<<"file opened with succes";
qDebug()<<"file opened with succes";
QTextStream stream( &file );
stream << str;
file.close();
......
......@@ -28,8 +28,7 @@
#include <kate/plugin.h>
#include <ktexteditor/view.h>
#include <klibloader.h>
#include <klocale.h>
#include <klocalizedstring.h>
#include <kurl.h>
#include <qlist.h>
......
......@@ -29,7 +29,7 @@
#include <QtGui/QLayout>
#include <QtCore/QTimer>
#include <klocale.h>
#include <klocalizedstring.h>
#include <kicon.h>
#include <ktexteditor/view.h>
#include <ktexteditor/document.h>
......
......@@ -31,8 +31,7 @@
#include <kmessagebox.h>
#include <kurlrequester.h>
#include <kurl.h>
#include <kdebug.h>
#include <klocale.h>
#include <klocalizedstring.h>
#include <signal.h>
#include <stdlib.h>
......@@ -508,7 +507,7 @@ void DebugView::processErrors()
QString error;
while (m_errorList.size() > 0) {
error = m_errorList.takeFirst();
//kDebug() << error;
//qDebug() << error;
if( error == "The program is not being run." )
{
if ( m_lastCommand == "continue" )
......@@ -613,7 +612,7 @@ void DebugView::issueNextCommand()
if( m_nextCommands.size() > 0)
{
QString cmd = m_nextCommands.takeFirst();
//kDebug() << "Next command" << cmd;
//qDebug() << "Next command" << cmd;
issueCommand( cmd );
}
else
......
......@@ -32,7 +32,6 @@
#include <kglobalsettings.h>
#include <kcolorscheme.h>
#include <kdebug.h>
#include <kstandarddirs.h>
#include <krandom.h>
......
......@@ -19,8 +19,7 @@
#include "localsview.h"
#include <QLabel>
#include <klocale.h>
#include <kdebug.h>
#include <klocalizedstring.h>
LocalsView::LocalsView(QWidget *parent)
......@@ -103,7 +102,7 @@ void LocalsView::addLocal(const QString &vString)
return; /* this is not an error */
}
if (!isValue.exactMatch(vString)) {
kDebug() << "Could not parse:" << vString;
qDebug() << "Could not parse:" << vString;
return;
}
symbolAndValue << isValue.cap(1);
......@@ -115,7 +114,7 @@ void LocalsView::addLocal(const QString &vString)
}
else {
if (!isPrettyValue.exactMatch(m_local)) {
kDebug() << "Could not parse:" << m_local;
qDebug() << "Could not parse:" << m_local;
m_local.clear();
return;
}
......@@ -166,7 +165,7 @@ void LocalsView::addStruct(QTreeWidgetItem *parent, const QString &vString)
break;
}
symbolAndValue << vString.mid(start, end-start);
//kDebug() << symbolAndValue;
//qDebug() << symbolAndValue;
// Value
start = end + 3;
end = start;
......
......@@ -33,9 +33,9 @@
#include <QtGui/QTreeWidget>
#include <QtGui/QKeyEvent>
#include <kaction.h>
#include <QAction>
#include <kactioncollection.h>
#include <klocale.h>
#include <klocalizedstring.h>
#include <kglobalsettings.h>
#include <kcolorscheme.h>
#include <kpluginfactory.h>
......@@ -642,12 +642,12 @@ QString KatePluginGDBView::currentWord( )
{
KTextEditor::View *kv = mainWindow()->activeView();
if (!kv) {
kDebug() << "no KTextEditor::View" << endl;
qDebug() << "no KTextEditor::View" << endl;
return QString();
}
if (!kv->cursorPosition().isValid()) {
kDebug() << "cursor not valid!" << endl;
qDebug() << "cursor not valid!" << endl;
return QString();
}
......@@ -685,11 +685,11 @@ QString KatePluginGDBView::currentWord( )
endPos++;
}
if (startPos == endPos) {
kDebug() << "no word found!" << endl;
qDebug() << "no word found!" << endl;
return QString();
}
//kDebug() << linestr.mid(startPos+1, endPos-startPos-1);
//qDebug() << linestr.mid(startPos+1, endPos-startPos-1);
return linestr.mid(startPos+1, endPos-startPos-1);
}
......
......@@ -11,7 +11,7 @@
#include "ctagskinds.h"
#include <klocale.h>
#include <klocalizedstring.h>
struct CTagsKindMapping {
char abbrev;
......
......@@ -270,7 +270,7 @@ void KateCTagsView::gotoTagForTypes(const QString &word, const QStringList &type
Tags::TagList list = Tags::getMatches(m_ctagsUi.tagsFile->text(), word, false, types);
if (list.size() == 0) list = Tags::getMatches(m_commonDB, word, false, types);
//kDebug() << "found" << list.count() << word << types;
//qDebug() << "found" << list.count() << word << types;
setNewLookupText(word);
if ( list.count() < 1) {
......@@ -369,7 +369,7 @@ QString KateCTagsView::currentWord( )
{
KTextEditor::View *kv = mainWindow()->activeView();
if (!kv) {
kDebug() << "no KTextEditor::View" << endl;
qDebug() << "no KTextEditor::View" << endl;
return QString();
}
......@@ -378,7 +378,7 @@ QString KateCTagsView::currentWord( )
}
if (!kv->cursorPosition().isValid()) {
kDebug() << "cursor not valid!" << endl;
qDebug() << "cursor not valid!" << endl;
return QString();
}
......@@ -403,7 +403,7 @@ QString KateCTagsView::currentWord( )
endPos++;
}
if (startPos == endPos) {
kDebug() << "no word found!" << endl;
qDebug() << "no word found!" << endl;
return QString();
}
......@@ -417,7 +417,7 @@ QString KateCTagsView::currentWord( )
linestr.remove(0, 1);
}
//kDebug() << linestr;
//qDebug() << linestr;
return linestr;
}
......@@ -470,7 +470,7 @@ void KateCTagsView::jumpToTag(const QString &file, const QString &pattern, const
url.setPath(abs.absoluteFilePath());
}
//kDebug() << url << pattern;
//qDebug() << url << pattern;
// save current location
TagJump from;
......
......@@ -45,12 +45,11 @@
#include <QDir>
#include <kaction.h>
#include <QAction>
#include <kactioncollection.h>
#include <kcursor.h>
#include <kdebug.h>
#include <kcomponentdata.h>
#include <klocale.h>
#include <klocalizedstring.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kpassivepopup.h>
......@@ -487,7 +486,7 @@ KUrl KateBuildView::docUrl()
{
KTextEditor::View *kv = mainWindow()->activeView();
if (!kv) {
kDebug() << "no KTextEditor::View" << endl;
qDebug() << "no KTextEditor::View" << endl;
return KUrl();
}
......@@ -749,13 +748,13 @@ void KateBuildView::slotReadReadyStdOut()
tmp = m_output_lines.mid(0, end);
tmp.remove('\n');
m_buildUi.plainTextEdit->appendPlainText(tmp);
//kDebug() << tmp;
//qDebug() << tmp;
if (tmp.indexOf(m_newDirDetector) >=0) {
//kDebug() << "Enter/Exit dir found";
//qDebug() << "Enter/Exit dir found";
int open = tmp.indexOf("`");
int close = tmp.indexOf("'");
KUrl newDir = KUrl(tmp.mid(open+1, close-open-1));
kDebug () << "New dir = " << newDir;
qDebug () << "New dir = " << newDir;
if ((m_make_dir_stack.size() > 1) && (m_make_dir_stack.top() == newDir)) {
m_make_dir_stack.pop();
......@@ -807,13 +806,13 @@ void KateBuildView::slotReadReadyStdErr()
void KateBuildView::processLine(const QString &line)
{
QString l = line;
//kDebug() << l ;
//qDebug() << l ;
//look for a filename
if (l.indexOf(m_filenameDetector)<0)
{
addError(QString(), 0, QString(), l);
//kDebug() << "A filename was not found in the line ";
//qDebug() << "A filename was not found in the line ";
return;
}
......@@ -827,7 +826,7 @@ void KateBuildView::processLine(const QString &line)
QString line_n = file_n_line.mid(name_end+1);
QString msg = l.remove(m_filenameDetector);
//kDebug() << "File Name:"<<filename<< " msg:"<< msg;
//qDebug() << "File Name:"<<filename<< " msg:"<< msg;
//add path to file
if (QFile::exists(m_make_dir.toLocalFile(KUrl::AddTrailingSlash)+filename)) {
filename = m_make_dir.toLocalFile(KUrl::AddTrailingSlash)+filename;
......@@ -1038,7 +1037,7 @@ void KateBuildView::slotDeleteTargetClicked()
void KateBuildView::targetSelected(int index)
{
if (index >= m_targetList.size() || (index < 0)) {
kDebug() << "Invalid target";
qDebug() << "Invalid target";
return;
}
......
......@@ -19,8 +19,7 @@
#include "targets.h"
#include "targets.moc"
#include <klocale.h>
#include <kdebug.h>
#include <klocalizedstring.h>
#include <QApplication>
#include <QHeaderView>
......
......@@ -18,7 +18,6 @@ Boston, MA 02110-1301, USA.
#include "cachedsqlquerymodel.h"
#include <kdebug.h>
CachedSqlQueryModel::CachedSqlQueryModel(QObject *parent, int cacheCapacity)
: QSqlQueryModel(parent)
......@@ -88,7 +87,7 @@ void CachedSqlQueryModel::clear()
void CachedSqlQueryModel::cacheRecords(int from, int to) const
{
kDebug() << "caching records from" << from << "to" << to;
qDebug() << "caching records from" << from << "to" << to;
for (int i = from; i <= to; ++i)
cache.insert(i, QSqlQueryModel::record(i));
......@@ -106,7 +105,7 @@ int CachedSqlQueryModel::cacheCapacity() const
void CachedSqlQueryModel::setCacheCapacity(int capacity)
{
kDebug() << "cache capacity set to" << capacity;
qDebug() << "cache capacity set to" << capacity;
cache.setCapacity(capacity);
}
......
......@@ -18,7 +18,6 @@
#include "connectionmodel.h"
#include <kdebug.h>
#include <kicon.h>
#include <kglobalsettings.h>
......
......@@ -19,12 +19,11 @@
#include "connectionwizard.h"
#include "sqlmanager.h"
#include <klocale.h>
#include <klocalizedstring.h>
#include <kcombobox.h>
#include <kmessagebox.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <kdebug.h>
#include <knuminput.h>
#include <qformlayout.h>
......
......@@ -20,9 +20,7 @@
#include "outputstyle.h"
#include <kcolorscheme.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <klocalizedstring.h>
#include <kconfiggroup.h>
#include <kglobalsettings.h>
......
......@@ -18,7 +18,7 @@
#include "dataoutputview.h"
#include <kaction.h>
#include <QAction>
#include <qcursor.h>
#include <qmenu.h>
......
......@@ -30,11 +30,10 @@
#include <kapplication.h>
#include <ktoolbar.h>
#include <ktoggleaction.h>