aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Haumann <dhaumann@kde.org>2014-01-20 16:02:36 (GMT)
committerDominik Haumann <dhaumann@kde.org>2014-01-20 16:02:45 (GMT)
commit9a8c405462a1dd5ac01e3ebdcde74ebd1028aacd (patch)
tree617a316bb3d8eaa45a1ea9984562327e6a6590fe
parentc79fa43d941e3681d73ebc004780d1de025b8c27 (diff)
fix porting bugs
-rw-r--r--addons/kate/CMakeLists.txt2
-rw-r--r--addons/kate/backtracebrowser/btdatabase.cpp3
-rw-r--r--addons/kate/backtracebrowser/katebacktracebrowser.cpp14
-rw-r--r--addons/kate/xmltools/plugin_katexmltools.cpp3
4 files changed, 14 insertions, 8 deletions
diff --git a/addons/kate/CMakeLists.txt b/addons/kate/CMakeLists.txt
index a305db1..a5b14a8 100644
--- a/addons/kate/CMakeLists.txt
+++ b/addons/kate/CMakeLists.txt
@@ -23,7 +23,7 @@ ecm_optional_add_subdirectory (katesql)
ecm_optional_add_subdirectory (filebrowser)
# xml completion
-ecm_optional_add_subdirectory ( xmltools )
+ecm_optional_add_subdirectory (xmltools)
#if(NOT WIN32)
# add_subdirectory( gdbplugin ) # reading /proc/...
diff --git a/addons/kate/backtracebrowser/btdatabase.cpp b/addons/kate/backtracebrowser/btdatabase.cpp
index 9cef92b..8c79063 100644
--- a/addons/kate/backtracebrowser/btdatabase.cpp
+++ b/addons/kate/backtracebrowser/btdatabase.cpp
@@ -32,7 +32,7 @@ void KateBtDatabase::loadFromFile(const QString &url)
QDataStream ds(&file);
ds >> db;
}
- qDebug() << "Number of entries in the backtrace database:" << db.size();
+// qDebug() << "Number of entries in the backtrace database" << url << ":" << db.size();
}
void KateBtDatabase::saveToFile(const QString &url) const
@@ -43,6 +43,7 @@ void KateBtDatabase::saveToFile(const QString &url) const
QDataStream ds(&file);
ds << db;
}
+// qDebug() << "Saved backtrace database to" << url;
}
QString KateBtDatabase::value(const QString &key)
diff --git a/addons/kate/backtracebrowser/katebacktracebrowser.cpp b/addons/kate/backtracebrowser/katebacktracebrowser.cpp
index b926f8f..ce1445d 100644
--- a/addons/kate/backtracebrowser/katebacktracebrowser.cpp
+++ b/addons/kate/backtracebrowser/katebacktracebrowser.cpp
@@ -57,8 +57,8 @@ KateBtBrowserPlugin::KateBtBrowserPlugin(QObject *parent, const QList<QVariant>
, indexer(&db)
{
s_self = this;
- db.loadFromFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation,
- QLatin1String("kate/backtracedatabase")));
+ db.loadFromFile(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
+ + QLatin1String("/katebtbrowser/backtracedatabase.db"));
}
KateBtBrowserPlugin::~KateBtBrowserPlugin()
@@ -68,10 +68,12 @@ KateBtBrowserPlugin::~KateBtBrowserPlugin()
indexer.wait();
}
- db.saveToFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation,
- QLatin1String("kate/backtracedatabase")));
+ const QString path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
+ + QLatin1String("/katebtbrowser");
+ QDir().mkpath(path);
+ db.saveToFile(path + QLatin1String("/backtracedatabase.db"));
- s_self = 0L;
+ s_self = 0;
}
KateBtBrowserPlugin &KateBtBrowserPlugin::self()
@@ -159,7 +161,7 @@ KateBtBrowserPluginView::KateBtBrowserPluginView(KateBtBrowserPlugin *plugin, KT
m_widget = new KateBtBrowserWidget(mainWindow, toolview);
connect(plugin, SIGNAL(newStatus(QString)),
- this, SLOT(setStatus(QString)));
+ m_widget, SLOT(setStatus(QString)));
}
KateBtBrowserPluginView::~KateBtBrowserPluginView()
diff --git a/addons/kate/xmltools/plugin_katexmltools.cpp b/addons/kate/xmltools/plugin_katexmltools.cpp
index 7e99b20..2fac432 100644
--- a/addons/kate/xmltools/plugin_katexmltools.cpp
+++ b/addons/kate/xmltools/plugin_katexmltools.cpp
@@ -1084,6 +1084,9 @@ InsertElement::InsertElement(const QStringList & completions, QWidget * parent)
m_okButton = box->button(QDialogButtonBox::Ok);
m_okButton->setDefault(true);
+ connect(box, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(box, SIGNAL(rejected()), this, SLOT(reject()));
+
// fill layout
topLayout->addWidget(label);
topLayout->addWidget(m_cmbElements);