Commit e6359818 authored by Milian Wolff's avatar Milian Wolff
Browse files

Port from KUrl to QUrl.

parent 942584d5
......@@ -53,7 +53,7 @@ find_package(KF5 REQUIRED COMPONENTS
find_package(KF5XmlGui 5.1 REQUIRED)
find_package(KDevPlatform ${KDEVPLATFORM_VERSION} REQUIRED)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_NO_URL_CAST_FROM_STRING)
remove_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0) # comes from KDELibs4Support
add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000)
......
......@@ -58,6 +58,7 @@
#include <interfaces/ilauncher.h>
#include <interfaces/iproject.h>
#include <interfaces/launchconfigurationtype.h>
#include <util/path.h>
#include "kdevideextension.h"
......@@ -65,10 +66,7 @@
#include "splash.h"
using KDevelop::Core;
// Represents a file to be opened, consisting of its URL and the linenumber to jump to
typedef QPair<QString, int> File;
using namespace KDevelop;
class KDevelopApplication: public KApplication {
public:
......@@ -105,10 +103,13 @@ static const KDevelop::SessionInfo* findSessionInList( QList<KDevelop::SessionIn
return 0;
}
// Represents a file to be opened, consisting of its URL and the linenumber to jump to
typedef QPair<QUrl, int> File;
/// Parses a filename given as an argument by determining its line number and full path
static File parseFilename(QString argument)
{
if ( KUrl::isRelativeUrl(argument) && ! argument.startsWith('/') ) {
if ( !argument.startsWith('/') && QFileInfo(argument).isRelative() ) {
argument = QDir::currentPath() + "/" + argument;
}
//Allow opening specific lines in documents, like mydoc.cpp:10
......@@ -124,7 +125,7 @@ static File parseFilename(QString argument)
line = lineNr;
}
}
return File(argument, line);
return File(QUrl::fromUserInput(argument), line);
}
/// Performs a DBus call to open the given @p files in the running kdev instance identified by @p pid
......@@ -137,10 +138,10 @@ static int openFilesInRunningInstance(const QVector<File>& files, int pid)
QStringList urls;
bool errors_occured = false;
foreach ( const File& file, files ) {
QDBusReply<bool> result = iface.call("openDocumentSimple", file.first);
QDBusReply<bool> result = iface.call("openDocumentSimple", file.first.toString());
if ( ! result.value() ) {
QTextStream err(stderr);
err << i18n("Could not open file %1.", file.first) << "\n";
err << i18n("Could not open file %1.", file.first.toDisplayString(QUrl::PreferLocalFile)) << "\n";
errors_occured = true;
}
}
......@@ -386,7 +387,7 @@ int main( int argc, char *argv[] )
qerr << endl << i18nc("@info:shell", "Specify the binary you want to debug.") << endl;
return 1;
}
debugeeName = i18n("Debug %1", KUrl( debugArgs.first() ).fileName());
debugeeName = i18n("Debug %1", QUrl( debugArgs.first() ).fileName());
session = debugeeName;
} else if ( args->isSet("cs") || args->isSet("new-session") )
{
......@@ -413,7 +414,7 @@ int main( int argc, char *argv[] )
break;
}
else if (projectAsSession.isEmpty()) {
foreach(const KUrl& k, si.projects)
foreach(const QUrl& k, si.projects)
{
QString fn(k.fileName());
fn = fn.left(fn.indexOf('.'));
......@@ -480,15 +481,15 @@ int main( int argc, char *argv[] )
if( info.suffix() == "kdev4" ) {
// make sure the project is not already opened by the session controller
bool shouldOpen = true;
KUrl url(info.absoluteFilePath());
Path path(info.absoluteFilePath());
foreach(KDevelop::IProject* p, core->projectController()->projects()) {
if (p->projectFileUrl() == url) {
if (p->projectFile() == path) {
shouldOpen = false;
break;
}
}
if (shouldOpen) {
core->projectController()->openProject( url );
core->projectController()->openProject( path.toUrl() );
}
}
}
......@@ -551,7 +552,7 @@ int main( int argc, char *argv[] )
} else {
foreach ( const File& file, initialFiles ) {
if(!core->documentController()->openDocument(file.first, KTextEditor::Cursor(file.second, 0))) {
kWarning() << i18n("Could not open %1", file.first);
kWarning() << i18n("Could not open %1", file.first.toDisplayString(QUrl::PreferLocalFile));
}
}
}
......
......@@ -31,7 +31,7 @@
#include <KToolInvocation>
#include <KConfig>
#include <KConfigGroup>
#include <KUrl>
#include <QUrl>
#include <KStringHandler>
bool kdevelopsessions_runner_compare_sessions(const Session &s1, const Session &s2) {
......
......@@ -30,7 +30,7 @@
#include <KConfigGroup>
#include <KTextEditor/Cursor>
#include <kurl.h>
#include <QUrl>
#include <interfaces/iplugin.h>
#include <interfaces/istatus.h>
......@@ -123,8 +123,8 @@ Q_SIGNALS:
void stopDebugger();
void attachTo(int pid);
void coreFile(const QString& core);
void runUntil(const KUrl& url, int line);
void jumpTo(const KUrl& url, int line);
void runUntil(const QUrl &url, int line);
void jumpTo(const QUrl &url, int line);
protected:
virtual void initializeGuiState();
......
......@@ -39,6 +39,7 @@
#include <KParts/MainWindow>
#include <KSharedConfig>
#include <KShell>
#include <QUrl>
#include <interfaces/idocument.h>
#include <interfaces/icore.h>
......@@ -365,7 +366,7 @@ void DebugSession::runToCursor()
if (KDevelop::IDocument* doc = KDevelop::ICore::self()->documentController()->activeDocument()) {
KTextEditor::Cursor cursor = doc->cursorPosition();
if (cursor.isValid())
runUntil(doc->url().path(), cursor.line() + 1);
runUntil(doc->url(), cursor.line() + 1);
}
}
......@@ -374,7 +375,7 @@ void DebugSession::jumpToCursor()
if (KDevelop::IDocument* doc = KDevelop::ICore::self()->documentController()->activeDocument()) {
KTextEditor::Cursor cursor = doc->cursorPosition();
if (cursor.isValid())
jumpTo(doc->url().path(), cursor.line() + 1);
jumpTo(doc->url(), cursor.line() + 1);
}
}
......@@ -1030,10 +1031,10 @@ bool DebugSession::startProgram(KDevelop::ILaunchConfiguration* cfg, IExecutePlu
QStringList arguments = iface->arguments(cfg, err);
// Change the "Working directory" to the correct one
KUrl dir = iface->workingDirectory(cfg);
QUrl dir = iface->workingDirectory(cfg);
if (dir.isEmpty() || !dir.isValid())
{
dir = QFileInfo(executable).absolutePath();
dir = QUrl::fromLocalFile(QFileInfo(executable).absolutePath());
}
queueCmd(new GDBCommand(GDBMI::EnvironmentCd, KShell::quoteArg(dir.toLocalFile())));
......
......@@ -234,8 +234,8 @@ void DisassembleWidget::currentSessionChanged(KDevelop::IDebugSession* s)
m_registersManager->setSession(session);
if (session) {
connect(session, SIGNAL(showStepInSource(KUrl,int,QString)),
SLOT(slotShowStepInSource(KUrl,int,QString)));
connect(session, SIGNAL(showStepInSource(QUrl,int,QString)),
SLOT(slotShowStepInSource(QUrl,int,QString)));
connect(session,SIGNAL(showStepInDisassemble(QString)),SLOT(update(QString)));
}
}
......@@ -293,7 +293,7 @@ void DisassembleWidget::slotActivate(bool activate)
/***************************************************************************/
void DisassembleWidget::slotShowStepInSource(const KUrl&, int,
void DisassembleWidget::slotShowStepInSource(const QUrl&, int,
const QString& currentAddress)
{
update(currentAddress);
......
......@@ -28,7 +28,7 @@
#include <QTreeWidget>
#include <KUrl>
#include <QUrl>
#include <KDialog>
#include <KConfigGroup>
......@@ -115,7 +115,7 @@ Q_SIGNALS:
public Q_SLOTS:
void slotActivate(bool activate);
void slotDeactivate();
void slotShowStepInSource(const KUrl &fileName, int lineNum, const QString &address);
void slotShowStepInSource(const QUrl &fileName, int lineNum, const QString &address);
void slotChangeAddress();
///Disassembles code at @p address and updates registers
void update(const QString &address);
......
......@@ -93,7 +93,7 @@ struct FrameListHandler : public GDBCommandHandler
f.nr = frame["level"].toInt();
f.name = getFunctionOrAddress(frame);
QPair<QString, int> loc = getSource(frame);
f.file = loc.first;
f.file = QUrl::fromLocalFile(loc.first);
f.line = loc.second;
frames << f;
}
......
......@@ -33,12 +33,12 @@ SelectCoreDialog::SelectCoreDialog(QWidget* parent)
setCaption(i18n("Select Core File"));
}
KUrl SelectCoreDialog::binary() const
QUrl SelectCoreDialog::binary() const
{
return m_ui.binaryFile->url();
}
KUrl SelectCoreDialog::core() const
QUrl SelectCoreDialog::core() const
{
return m_ui.coreFile->url();
}
......
......@@ -24,7 +24,7 @@
#include <KDialog>
#include "ui_selectcore.h"
#include <kurl.h>
#include <QUrl>
namespace GDBDebugger {
......@@ -32,8 +32,8 @@ class SelectCoreDialog : public KDialog
{
public:
SelectCoreDialog(QWidget *parent = 0);
KUrl binary() const;
KUrl core() const;
QUrl binary() const;
QUrl core() const;
private:
Ui::SelectCore m_ui;
......
......@@ -217,7 +217,7 @@ void GdbTest::testBreakpoint()
TestLaunchConfiguration cfg;
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(debugeeFileName, 28);
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 28);
QCOMPARE(session->breakpointController()->breakpointState(b), KDevelop::Breakpoint::NotStartedState);
session->startProgram(&cfg, m_iface);
......@@ -246,17 +246,17 @@ void GdbTest::testDisableBreakpoint()
KDevelop::Breakpoint *b;
b = breakpoints()->addCodeBreakpoint(debugeeFileName, firstBreakLine);
b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), firstBreakLine);
b->setData(KDevelop::Breakpoint::EnableColumn, Qt::Unchecked);
//this is needed to emulate debug from GUI. If we are in edit mode, the debugSession doesn't exist.
KDevelop::ICore::self()->debugController()->breakpointModel()->blockSignals(true);
b = breakpoints()->addCodeBreakpoint(debugeeFileName, secondBreakLine);
b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), secondBreakLine);
b->setData(KDevelop::Breakpoint::EnableColumn, Qt::Unchecked);
//all disabled breakpoints were added
KDevelop::Breakpoint * thirdBreak = breakpoints()->addCodeBreakpoint(debugeeFileName, thirdBreakLine);
KDevelop::Breakpoint * thirdBreak = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), thirdBreakLine);
KDevelop::ICore::self()->debugController()->breakpointModel()->blockSignals(false);
......@@ -269,7 +269,7 @@ void GdbTest::testDisableBreakpoint()
thirdBreak->setData(KDevelop::Breakpoint::EnableColumn, Qt::Unchecked);
//add another disabled breakpoint
b = breakpoints()->addCodeBreakpoint(debugeeFileName, fourthBreakLine);
b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), fourthBreakLine);
QTest::qWait(300);
b->setData(KDevelop::Breakpoint::EnableColumn, Qt::Unchecked);
......@@ -284,7 +284,7 @@ void GdbTest::testChangeLocationBreakpoint()
TestLaunchConfiguration cfg;
KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(debugeeFileName, 27);
KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 27);
session->startProgram(&cfg, m_iface);
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -320,12 +320,12 @@ void GdbTest::testDeleteBreakpoint()
QCOMPARE(breakpoints()->rowCount(), 0);
//add breakpoint before startProgram
breakpoints()->addCodeBreakpoint(debugeeFileName, 21);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 21);
QCOMPARE(breakpoints()->rowCount(), 1);
breakpoints()->removeRow(0);
QCOMPARE(breakpoints()->rowCount(), 0);
breakpoints()->addCodeBreakpoint(debugeeFileName, 22);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 22);
session->startProgram(&cfg, m_iface);
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -341,9 +341,9 @@ void GdbTest::testPendingBreakpoint()
TestDebugSession *session = new TestDebugSession;
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 28);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 28);
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(findSourceFile("/gdbtest.cpp"), 10);
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(findSourceFile("/gdbtest.cpp")), 10);
QCOMPARE(session->breakpointController()->breakpointState(b), KDevelop::Breakpoint::NotStartedState);
session->startProgram(&cfg, m_iface);
......@@ -358,7 +358,7 @@ void GdbTest::testUpdateBreakpoint()
TestDebugSession *session = new TestDebugSession;
TestLaunchConfiguration cfg;
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(debugeeFileName, 28);
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 28);
QCOMPARE(breakpoints()->rowCount(), 1);
session->startProgram(&cfg, m_iface);
......@@ -383,10 +383,10 @@ void GdbTest::testIgnoreHitsBreakpoint()
TestDebugSession *session = new TestDebugSession;
TestLaunchConfiguration cfg;
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(debugeeFileName, 21);
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 21);
b->setIgnoreHits(1);
b = breakpoints()->addCodeBreakpoint(debugeeFileName, 22);
b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 22);
session->startProgram(&cfg, m_iface);
......@@ -404,13 +404,13 @@ void GdbTest::testConditionBreakpoint()
TestDebugSession *session = new TestDebugSession;
TestLaunchConfiguration cfg;
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(debugeeFileName, 39);
KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 39);
b->setCondition("x[0] == 'H'");
b = breakpoints()->addCodeBreakpoint(debugeeFileName, 23);
b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 23);
b->setCondition("i==2");
b = breakpoints()->addCodeBreakpoint(debugeeFileName, 24);
b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 24);
session->startProgram(&cfg, m_iface);
......@@ -433,7 +433,7 @@ void GdbTest::testBreakOnWriteBreakpoint()
TestDebugSession *session = new TestDebugSession;
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 24);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 24);
session->startProgram(&cfg, m_iface);
......@@ -458,7 +458,7 @@ void GdbTest::testBreakOnWriteWithConditionBreakpoint()
TestDebugSession *session = new TestDebugSession;
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 24);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 24);
session->startProgram(&cfg, m_iface);
......@@ -503,7 +503,7 @@ void GdbTest::testBreakOnReadBreakpoint2()
TestDebugSession *session = new TestDebugSession;
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 24);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 24);
session->startProgram(&cfg, m_iface);
......@@ -529,7 +529,7 @@ void GdbTest::testBreakOnAccessBreakpoint()
TestDebugSession *session = new TestDebugSession;
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 24);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 24);
session->startProgram(&cfg, m_iface);
......@@ -566,7 +566,7 @@ void GdbTest::testInsertBreakpointWhileRunning()
WAIT_FOR_STATE(session, DebugSession::ActiveState);
QTest::qWait(2000);
kDebug() << "adding breakpoint";
KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(fileName, 25);
KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25);
QTest::qWait(500);
WAIT_FOR_STATE(session, DebugSession::PausedState);
QTest::qWait(500);
......@@ -587,8 +587,8 @@ void GdbTest::testInsertBreakpointWhileRunningMultiple()
WAIT_FOR_STATE(session, DebugSession::ActiveState);
QTest::qWait(2000);
kDebug() << "adding breakpoint";
KDevelop::Breakpoint *b1 = breakpoints()->addCodeBreakpoint(fileName, 24);
KDevelop::Breakpoint *b2 = breakpoints()->addCodeBreakpoint(fileName, 25);
KDevelop::Breakpoint *b1 = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 24);
KDevelop::Breakpoint *b2 = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25);
QTest::qWait(500);
WAIT_FOR_STATE(session, DebugSession::PausedState);
QTest::qWait(500);
......@@ -625,7 +625,7 @@ void GdbTest::testShowStepInSource()
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 29);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 29);
session->startProgram(&cfg, m_iface);
WAIT_FOR_STATE(session, DebugSession::PausedState);
session->stepInto();
......@@ -658,7 +658,7 @@ void GdbTest::testStack()
TestFrameStackModel *stackModel = session->frameStackModel();
breakpoints()->addCodeBreakpoint(debugeeFileName, 21);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 21);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -700,7 +700,7 @@ void GdbTest::testStackFetchMore()
TestFrameStackModel *stackModel = session->frameStackModel();
breakpoints()->addCodeBreakpoint(fileName, 25);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
QCOMPARE(session->frameStackModel()->fetchFramesCalled, 1);
......@@ -770,7 +770,7 @@ void GdbTest::testStackDeactivateAndActive()
TestFrameStackModel *stackModel = session->frameStackModel();
breakpoints()->addCodeBreakpoint(debugeeFileName, 21);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 21);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -799,7 +799,7 @@ void GdbTest::testStackSwitchThread()
TestFrameStackModel *stackModel = session->frameStackModel();
breakpoints()->addCodeBreakpoint(fileName, 38);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 38);
QVERIFY(session->startProgram(&cfg, m_iface));
QTest::qWait(500);
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -847,7 +847,7 @@ void GdbTest::testAttach()
session->attachToProcess(debugeeProcess.pid());
WAIT_FOR_STATE(session, DebugSession::PausedState);
breakpoints()->addCodeBreakpoint(fileName, 34);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 34);
QTest::qWait(100);
session->run();
QTest::qWait(2000);
......@@ -904,7 +904,7 @@ void GdbTest::testVariablesLocals()
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 22);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 22);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
QTest::qWait(1000);
......@@ -931,7 +931,7 @@ void GdbTest::testVariablesLocalsStruct()
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 38);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 38);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
QTest::qWait(1000);
......@@ -977,7 +977,7 @@ void GdbTest::testVariablesWatches()
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 38);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 38);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -1020,7 +1020,7 @@ void GdbTest::testVariablesWatchesQuotes()
const QString testString("test");
const QString quotedTestString("\"" + testString + "\"");
breakpoints()->addCodeBreakpoint(debugeeFileName, 38);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 38);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -1058,7 +1058,7 @@ void GdbTest::testVariablesWatchesTwoSessions()
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 38);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 38);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -1114,7 +1114,7 @@ void GdbTest::testVariablesStopDebugger()
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 38);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 38);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -1130,14 +1130,14 @@ void GdbTest::testVariablesStartSecondSession()
TestLaunchConfiguration cfg;
breakpoints()->addCodeBreakpoint(debugeeFileName, 38);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 38);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
session = new TestDebugSession;
session->variableController()->setAutoUpdate(KDevelop::IVariableController::UpdateLocals);
breakpoints()->addCodeBreakpoint(debugeeFileName, 38);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 38);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
......@@ -1153,7 +1153,7 @@ void GdbTest::testVariablesSwitchFrame()
session->variableController()->setAutoUpdate(KDevelop::IVariableController::UpdateLocals);
TestFrameStackModel *stackModel = session->frameStackModel();
breakpoints()->addCodeBreakpoint(debugeeFileName, 24);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 24);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
QTest::qWait(500);
......@@ -1186,7 +1186,7 @@ void GdbTest::testVariablesQuicklySwitchFrame()
session->variableController()->setAutoUpdate(KDevelop::IVariableController::UpdateLocals);
TestFrameStackModel *stackModel = session->frameStackModel();
breakpoints()->addCodeBreakpoint(debugeeFileName, 24);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 24);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
QTest::qWait(500);
......@@ -1231,7 +1231,7 @@ void GdbTest::testSegfaultDebugee()
TestLaunchConfiguration cfg(findExecutable("debugeecrash"));
QString fileName = findSourceFile("debugeecrash.cpp");
breakpoints()->addCodeBreakpoint(fileName, 23);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 23);
QVERIFY(session->startProgram(&cfg, m_iface));
......@@ -1254,7 +1254,7 @@ void GdbTest::testSwitchFrameGdbConsole()
TestFrameStackModel *stackModel = session->frameStackModel();
breakpoints()->addCodeBreakpoint(debugeeFileName, 24);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 24);
QVERIFY(session->startProgram(&cfg, m_iface));
WAIT_FOR_STATE(session, DebugSession::PausedState);
QCOMPARE(stackModel->currentFrame(), 0);
......@@ -1282,7 +1282,7 @@ void GdbTest::testInsertAndRemoveBreakpointWhileRunning()
WAIT_FOR_STATE(session, DebugSession::ActiveState);
QTest::qWait(2000);
kDebug() << "adding breakpoint";
KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(fileName, 25);
KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25);
b->setDeleted();
WAIT_FOR_STATE(session, DebugSession::EndedState);
}
......@@ -1433,8 +1433,8 @@ void GdbTest::testRemoteDebugInsertBreakpoint()
TestDebugSession *session = new TestDebugSession;
breakpoints()->addCodeBreakpoint(debugeeFileName, 29);
breakpoints()->addCodeBreakpoint(debugeeFileName, 35);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 29);
breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(debugeeFileName), 35);
QTemporaryFile shellScript(QDir::currentPath()+"/shellscript");
shellScript.open();
......@@ -1485,7 +1485,7 @@ void GdbTest::testRemoteDebugInsertBreakpointPickupOnlyOnce()
TestDebugSession *session = new TestDebugSession;
breakpoint