summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rekonqrun.cpp8
-rw-r--r--src/rekonqrun.h30
2 files changed, 25 insertions, 13 deletions
diff --git a/src/rekonqrun.cpp b/src/rekonqrun.cpp
index ecabe9bc..47ff7f27 100644
--- a/src/rekonqrun.cpp
+++ b/src/rekonqrun.cpp
@@ -50,7 +50,7 @@ RekonqRun::~RekonqRun()
}
-void RekonqRun::loadUrl(const KUrl& url, const Rekonq::BrowserArguments& browserArgs)
+void RekonqRun::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
{
if (url.isEmpty())
return;
@@ -113,7 +113,7 @@ void RekonqRun::loadUrl(const KUrl& url, const Rekonq::BrowserArguments& browser
WebView *webView = m_window->newTab();
m_window->currentUrlBar()->setUrl(loadingUrl.prettyUrl());
- switch(browserArgs)
+ switch(type)
{
case Rekonq::Default:
if (!Rekonq::openTabsBack())
@@ -136,9 +136,9 @@ void RekonqRun::loadUrl(const KUrl& url, const Rekonq::BrowserArguments& browser
}
-void RekonqRun::loadUrl(const QString& urlString, const Rekonq::BrowserArguments& browserArgs)
+void RekonqRun::loadUrl(const QString& urlString, const Rekonq::OpenType& type)
{
- return loadUrl( guessUrlFromString(urlString), browserArgs );
+ return loadUrl( guessUrlFromString(urlString), type );
}
diff --git a/src/rekonqrun.h b/src/rekonqrun.h
index ee96024b..d5113df1 100644
--- a/src/rekonqrun.h
+++ b/src/rekonqrun.h
@@ -30,19 +30,31 @@
namespace Rekonq
{
/**
- * @short opening tab behaviour
- * Different open tab behaviour
+ * @short Open link options
+ * Different modes of opening new tab
*/
-
- enum BrowserArguments
+ enum OpenType
{
- Default, ///< follow rekonq settings
- New, ///< open tab with focus
- Background ///< open tab in the background
+ Default, ///< open url according to users settings
+ New, ///< open url in new tab and make it current
+ Background ///< open url in new tab in background
};
}
+/**
+ * RekonqRun is not inherited from KRun or KParts::BrowserRun, as probably expected.
+ * We (actually) use this class just to find the REAL url to load (and load it!), so it does
+ * these operations:
+ *
+ * - stop loading malformed urls
+ * - find url scheme on relative urls
+ * - find right url to load on SearchProviders (Google, Wikipedia, etc.)
+ * - handle local urls (launches dolphin)
+ * - guess urls from strings
+ *
+*/
+
class RekonqRun : public QObject
{
Q_OBJECT
@@ -55,11 +67,11 @@ public:
public slots:
void loadUrl( const KUrl& url,
- const Rekonq::BrowserArguments& browserArgs = Rekonq::Default
+ const Rekonq::OpenType& type = Rekonq::Default
);
void loadUrl( const QString& urlString,
- const Rekonq::BrowserArguments& browserArgs = Rekonq::Default
+ const Rekonq::OpenType& type = Rekonq::Default
);
private: