Commit 3cec878b authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau

Merge branch '5.4'

parents 0f21717e d8023d36
Pipeline #6544 passed with stage
in 51 minutes and 54 seconds
......@@ -253,7 +253,7 @@ void MainWindow::dropEvent( QDropEvent* ev )
bool eventUsed = false;
if (urls.size() == 1) {
eventUsed = Core::self()->projectControllerInternal()->fetchProjectFromUrl(urls.at(0));
eventUsed = Core::self()->projectControllerInternal()->fetchProjectFromUrl(urls.at(0), ProjectController::NoFetchFlags);
}
if (!eventUsed) {
......
......@@ -911,7 +911,7 @@ void ProjectController::openProject( const QUrl &projectFile )
}
}
bool ProjectController::fetchProjectFromUrl(const QUrl& repoUrl)
bool ProjectController::fetchProjectFromUrl(const QUrl& repoUrl, FetchFlags fetchFlags)
{
Q_D(ProjectController);
......@@ -930,8 +930,10 @@ bool ProjectController::fetchProjectFromUrl(const QUrl& repoUrl)
}
}
if (!vcsOrProviderPlugin) {
KMessageBox::error(Core::self()->uiController()->activeMainWindow(),
i18n("No enabled plugin supports this repository URL: %1", repoUrl.toDisplayString()));
if (fetchFlags.testFlag(FetchShowErrorIfNotSupported)) {
KMessageBox::error(Core::self()->uiController()->activeMainWindow(),
i18n("No enabled plugin supports this repository URL: %1", repoUrl.toDisplayString()));
}
return false;
}
......
......@@ -97,11 +97,17 @@ public:
ContextMenuExtension contextMenuExtension(KDevelop::Context* ctx, QWidget* parent);
enum FetchFlag {
NoFetchFlags = 0,
FetchShowErrorIfNotSupported = 1,
};
Q_DECLARE_FLAGS(FetchFlags, FetchFlag)
/**
* @param repoUrl url identifying the repo
* @returns @c true if a plugin was found to handle the repo (also if user cancelled), @c false otherwise
*/
bool fetchProjectFromUrl(const QUrl& repoUrl);
bool fetchProjectFromUrl(const QUrl& repoUrl, FetchFlags fetchFlags = FetchShowErrorIfNotSupported);
public Q_SLOTS:
Q_SCRIPTABLE void openProjectForUrl( const QString &sourceUrl ) { openProjectForUrl(QUrl(sourceUrl)); }
......
......@@ -43,6 +43,7 @@ class OktetaPlugin;
class OktetaDocument : public Sublime::UrlDocument, public IDocument
{
Q_OBJECT
Q_INTERFACES(KDevelop::IDocument)
public:
OktetaDocument( const QUrl &url, ICore* core );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment