drkonqi: remove Windows leftovers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-04-16 14:35:59 +00:00
parent 0cba1c261d
commit c6d67eace2
4 changed files with 2 additions and 187 deletions

View file

@ -72,22 +72,7 @@ bool DebuggerManager::debuggerIsRunning() const
bool DebuggerManager::showExternalDebuggers() const
{
KConfigGroup config(KGlobal::config(), "DrKonqi");
bool showDebugger = config.readEntry("ShowDebugButton", false);
// TODO: remove all these compatibility code when KDE SC 4.11
// is considered as totally outdated
//
//for compatibility with drkonqi 1.0, if "ShowDebugButton" is not specified in the config
//and the old "ConfigName" key exists and is set to "developer", we show the debug button.
if (!config.hasKey("ShowDebugButton") &&
config.readEntry("ConfigName") == "developer") {
showDebugger = true;
// migrate and remove the long deprecated entry
config.writeEntry("ShowDebugButton", true);
config.deleteEntry("ConfigName");
}
return showDebugger;
return config.readEntry("ShowDebugButton", false);
}
QList<AbstractDebuggerLauncher*> DebuggerManager::availableExternalDebuggers() const

View file

@ -1,97 +0,0 @@
/*******************************************************************
* findconfigdatajob.cpp
* Copyright 2011 Matthias Fuchs <mat69@gmx.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************/
#include "findconfigdatajob.h"
#include <KDebug>
#include <KIO/Job>
#include <KLocalizedString>
FindConfigDataJob::FindConfigDataJob(const QString &productName, const KUrl &bugtrackerBaseUrl, QObject *parent)
: KJob(parent),
m_job(0),
m_url(bugtrackerBaseUrl)
{
m_url.addPath("config.cgi");
m_url.addQueryItem("product", productName);
}
FindConfigDataJob::~FindConfigDataJob()
{
if (m_job) {
m_job->kill();
}
}
void FindConfigDataJob::start()
{
m_job = KIO::storedGet(m_url, KIO::Reload, KIO::HideProgressInfo);
connect(m_job, SIGNAL(result(KJob*)), this, SLOT(receivedData(KJob*)));
connect(m_job, SIGNAL(infoMessage(KJob*,QString,QString)), this, SIGNAL(infoMessage(KJob*,QString,QString)));
connect(m_job, SIGNAL(warning(KJob*,QString,QString)), this, SIGNAL(warning(KJob*,QString,QString)));
m_job->start();
}
QString FindConfigDataJob::errorString() const
{
return m_errorString;
}
void FindConfigDataJob::receivedData(KJob *job)
{
Q_UNUSED(job);
if (m_job->error()) {
setError(m_job->error());
m_errorString = i18n("Failed to retrieve the config data.");
} else {
m_data = m_job->data();
}
m_job = 0;
emitResult();
}
QStringList FindConfigDataJob::data(InformationType type)
{
QStringList result;
QString key;
switch (type) {
case Version:
key = "version\\['[^\']+'\\]";
break;
default:
Q_ASSERT(false);
break;
}
QRegExp rx(key + " = \\[ (('[^\']+', )+) \\];");
if (rx.indexIn(m_data) != -1) {
QString temp = rx.cap(1);
temp.remove('\'');
temp.remove(' ');
result = temp.split(',', QString::SkipEmptyParts);
}
kDebug() << "Found data for " + key + ':' << result << result.count();
return result;
}
#include "moc_findconfigdatajob.cpp"

View file

@ -1,70 +0,0 @@
/*******************************************************************
* findconfigdatajob.h
* Copyright 2011 Matthias Fuchs <mat69@gmx.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************/
#ifndef DRKONQI_FIND_VERSIONS_JOB_H
#define DRKONQI_FIND_VERSIONS_JOB_H
#include <QtCore/QStringList>
#include <KJob>
#include <KUrl>
namespace KIO {
class StoredTransferJob;
}
/**
* This job downloads config.cgi for a specified product,
* looking for the information you want to retrieve
*/
class FindConfigDataJob : public KJob
{
Q_OBJECT
public:
/**
* @param productName e.g. "plasma"
* @param bugtrackerBaseUrl e.g. "https://bugs.kde.org"
*/
explicit FindConfigDataJob(const QString &productName, const KUrl &bugtrackerBaseUrl, QObject *parent = 0);
virtual ~FindConfigDataJob();
virtual void start();
virtual QString errorString() const;
enum InformationType {
Version
};
/**
* Call this after the job finished to retrieve the
* specified data
*/
QStringList data(InformationType type);
private slots:
void receivedData(KJob *job);
private:
KIO::StoredTransferJob *m_job;
KUrl m_url;
QString m_data;
QString m_errorString;
};
#endif

View file

@ -194,10 +194,7 @@ static bool lineShouldBeIgnored(const BacktraceLine & line)
|| line.functionName().startsWith(QLatin1String("*__GI_")) //glibc2.9 uses *__GI_ as prefix
|| line.libraryName().contains("libpthread.so")
|| line.libraryName().contains("libglib-2.0.so")
|| line.libraryName().contains("ntdll.dll")
|| line.libraryName().contains("kernel32.dll")
|| line.functionName().contains("_tmain")
|| line.functionName() == QLatin1String("WinMain") )
|| line.functionName().contains("_tmain") )
return true;
return false;