[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:08:03 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=38c01cf

The following commit has been merged in the master branch:
commit 38c01cf780e1e0a2f8ebe024481d5c5696368969
Author: mayank jha <mjnovice at gmail.com>
Date:   Mon Mar 3 22:28:14 2014 +0100

    Adds the feature to save the log files in the debugger.
    
    Adds a button Save Log file to save the log in the currentTab of the TabWidget.
    
    REVIEW: 116560
    BUG: 303564
---
 tools/debugger/debug-message-view.cpp |  7 ++++++-
 tools/debugger/debug-message-view.h   |  1 +
 tools/debugger/main-window.cpp        |  5 +++++
 tools/debugger/main-window.h          |  3 +++
 tools/debugger/main-window.ui         | 16 +++++++++++++---
 5 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/tools/debugger/debug-message-view.cpp b/tools/debugger/debug-message-view.cpp
index c2ead13..0b006e2 100644
--- a/tools/debugger/debug-message-view.cpp
+++ b/tools/debugger/debug-message-view.cpp
@@ -32,6 +32,7 @@
 #include <KService>
 #include <KTextEditor/View>
 #include <kfind.h>
+#include <KFileDialog>
 
 #include <ctime>
 #include <QDate>
@@ -235,7 +236,11 @@ void DebugMessageView::appendMessage(const Tp::DebugMessage &msg)
     }
 }
 
-
+void DebugMessageView::saveLogFile()
+{
+    KUrl savedFile = KFileDialog::getSaveFileName(KUrl(), QString(), 0, i18n("Save Log"));
+    m_editor->saveAs(savedFile);
+}
 
 
 
diff --git a/tools/debugger/debug-message-view.h b/tools/debugger/debug-message-view.h
index 49a4b2f..0bde707 100644
--- a/tools/debugger/debug-message-view.h
+++ b/tools/debugger/debug-message-view.h
@@ -33,6 +33,7 @@ public:
     void setService(const QString & service);
     virtual ~DebugMessageView();
     virtual void showEvent(QShowEvent* );
+    void saveLogFile();
 
 private Q_SLOTS:
     void onServiceRegistered(const QString & service);
diff --git a/tools/debugger/main-window.cpp b/tools/debugger/main-window.cpp
index faf7c22..cffd410 100644
--- a/tools/debugger/main-window.cpp
+++ b/tools/debugger/main-window.cpp
@@ -36,6 +36,7 @@ MainWindow::MainWindow(QWidget *parent)
     connect(m_ui.hazeLogsView, SIGNAL(statusMessage(QString)), statusBar(), SLOT(showMessage(QString)));
     connect(m_ui.salutLogsView, SIGNAL(statusMessage(QString)), statusBar(), SLOT(showMessage(QString)));
     connect(m_ui.rakiaLogsView, SIGNAL(statusMessage(QString)), statusBar(), SLOT(showMessage(QString)));
+    connect(m_ui.saveButton, SIGNAL(clicked()), this, SLOT(saveLogFile()));
 }
 
 MainWindow::~MainWindow()
@@ -43,3 +44,7 @@ MainWindow::~MainWindow()
 
 }
 
+void MainWindow::saveLogFile()
+{
+    m_ui.tabWidget->currentWidget()->findChild<DebugMessageView *>()->saveLogFile();
+}
\ No newline at end of file
diff --git a/tools/debugger/main-window.h b/tools/debugger/main-window.h
index 3876767..67ea785 100644
--- a/tools/debugger/main-window.h
+++ b/tools/debugger/main-window.h
@@ -28,6 +28,9 @@ public:
     explicit MainWindow(QWidget *parent = 0);
     virtual ~MainWindow();
 
+public Q_SLOTS:
+    void saveLogFile();
+
 private:
     Ui::MainWindow m_ui;
 };
diff --git a/tools/debugger/main-window.ui b/tools/debugger/main-window.ui
index 0813149..b400a6b 100644
--- a/tools/debugger/main-window.ui
+++ b/tools/debugger/main-window.ui
@@ -6,11 +6,21 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>592</width>
-    <height>420</height>
+    <width>598</width>
+    <height>435</height>
    </rect>
   </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QToolButton" name="saveButton">
+     <property name="toolTip">
+      <string>Saves the log into a file.</string>
+     </property>
+     <property name="text">
+      <string>Save log</string>
+     </property>
+    </widget>
+   </item>
    <item>
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list