From 607e2d44d0b6a78b8901eb7f2505e7ea72eaf029 Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Tue, 27 Sep 2011 22:59:28 +0800 Subject: [PATCH] Define the default debug area and no more "kDebug(1211)". --- CMakeLists.txt | 1 + src/BlockArray.cpp | 6 +++--- src/ColorScheme.cpp | 4 ++-- src/Part.cpp | 2 +- src/Profile.cpp | 2 +- src/SessionController.cpp | 8 ++++---- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0943f3042..83a8c5cea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ include(KDE4Defaults) add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) +add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1211) include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) KDE4_NO_ENABLE_FINAL(konsole) diff --git a/src/BlockArray.cpp b/src/BlockArray.cpp index 41cba44d3..2b8721966 100644 --- a/src/BlockArray.cpp +++ b/src/BlockArray.cpp @@ -114,12 +114,12 @@ const Block* BlockArray::at(size_t i) return lastmap; if (i > index) { - //kDebug(1211) << "BlockArray::at() i > index\n"; + //kDebug() << "BlockArray::at() i > index\n"; return 0; } // if (index - i >= length) { -// kDebug(1211) << "BlockArray::at() index - i >= length\n"; +// kDebug() << "BlockArray::at() index - i >= length\n"; // return 0; // } @@ -155,7 +155,7 @@ bool BlockArray::setSize(size_t newsize) bool BlockArray::setHistorySize(size_t newsize) { -// kDebug(1211) << "setHistorySize " << size << " " << newsize; +// kDebug() << "setHistorySize " << size << " " << newsize; if (size == newsize) return false; diff --git a/src/ColorScheme.cpp b/src/ColorScheme.cpp index ee1d9b6a5..fbc5617d4 100644 --- a/src/ColorScheme.cpp +++ b/src/ColorScheme.cpp @@ -370,12 +370,12 @@ ColorSchemeWallpaper::ColorSchemeWallpaper(const QString& path) : _path(path), _picture(0) { - // kDebug(1211) << "wallpaper created" << _path << "\n"; + // kDebug() << "wallpaper created" << _path << "\n"; } ColorSchemeWallpaper::~ColorSchemeWallpaper() { - // kDebug(1211) << "wallpaper deleted" << _path << "\n"; + // kDebug() << "wallpaper deleted" << _path << "\n"; delete _picture; } diff --git a/src/Part.cpp b/src/Part.cpp index cfd8b770a..240ef2859 100644 --- a/src/Part.cpp +++ b/src/Part.cpp @@ -288,7 +288,7 @@ bool Part::openUrl( const KUrl & _url ) setUrl( _url ); emit setWindowCaption( _url.pathOrUrl() ); - //kdDebug(1211) << "Set Window Caption to " << url.pathOrUrl(); + //kdDebug() << "Set Window Caption to " << url.pathOrUrl(); emit started( 0 ); if ( _url.isLocalFile() /*&& b_openUrls*/ ) { diff --git a/src/Profile.cpp b/src/Profile.cpp index 80f78491a..eafb4dd95 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -326,7 +326,7 @@ QString KDE4ProfileWriter::getPath(const Profile::Ptr info) newPath = KGlobal::dirs()->saveLocation("data","konsole/") + info->name() + ".profile"; } - //kDebug(1211) << "Saving profile under name: " << newPath; + //kDebug() << "Saving profile under name: " << newPath; return newPath; } diff --git a/src/SessionController.cpp b/src/SessionController.cpp index ca9811519..1db01f0c3 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -287,7 +287,7 @@ void SessionController::openUrl( const KUrl& url ) i18n("Konsole does not know how to open the bookmark: ") + url.prettyUrl()); - kWarning(1211) << "Unable to open bookmark at url" << url << ", I do not know" + kWarning() << "Unable to open bookmark at url" << url << ", I do not know" << " how to handle the protocol " << url.protocol(); } } @@ -1001,7 +1001,7 @@ void SessionController::showHistoryOptions() } void SessionController::sessionResizeRequest(const QSize& size) { - //kDebug(1211) << "View resize requested to " << size; + //kDebug() << "View resize requested to " << size; _view->setSize(size.width(),size.height()); } void SessionController::scrollBackOptionsChanged(int mode, int lines, bool saveToCurrentProfile ) @@ -1142,7 +1142,7 @@ void SessionController::showDisplayContextMenu(const QPoint& position) KXMLGUIFactory* factory = new KXMLGUIFactory(clientBuilder(), this); factory->addClient(this); - //kDebug(1211) << "Created xmlgui factory" << factory; + //kDebug() << "Created xmlgui factory" << factory; } QPointer popup = qobject_cast(factory()->container("session-popup-menu",this)); @@ -1592,7 +1592,7 @@ void SearchHistoryTask::highlightResult(ScreenWindowPtr window , int findPos) //work out how many lines into the current block of text the search result was found //- looks a little painful, but it only has to be done once per search. - //kDebug(1211) << "Found result at line " << findPos; + //kDebug() << "Found result at line " << findPos; //update display to show area of history containing selection window->scrollTo(findPos);