[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abecsi at webkit.org abecsi at webkit.org
Wed Dec 22 12:50:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 90c3934aa41318c8d9af041c23dc01dfcac935c3
Author: abecsi at webkit.org <abecsi at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 31 17:24:48 2010 +0000

    2010-08-31  Zoltan Horvath  <zoltan at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Read command line arguments and open them as URLs in new windows
            https://bugs.webkit.org/show_bug.cgi?id=44944
    
            Extend MiniBrowser to accept command line arguments and open them as URLs in new browser windows.
    
            * MiniBrowser/qt/main.cpp:
            (main):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66501 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 58e1ceb..11a053c 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-31  Zoltan Horvath  <zoltan at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Read command line arguments and open them as URLs in new windows
+        https://bugs.webkit.org/show_bug.cgi?id=44944
+
+        Extend MiniBrowser to accept command line arguments and open them as URLs in new browser windows.
+
+        * MiniBrowser/qt/main.cpp:
+        (main):
+
 2010-08-31  Adrian Perez  <aperez at igalia.com>
 
         Reviewed by Martin Robinson.
diff --git a/WebKitTools/MiniBrowser/qt/main.cpp b/WebKitTools/MiniBrowser/qt/main.cpp
index 8130cd2..2bc346b 100644
--- a/WebKitTools/MiniBrowser/qt/main.cpp
+++ b/WebKitTools/MiniBrowser/qt/main.cpp
@@ -32,8 +32,23 @@
 int main(int argc, char** argv) {
     QApplication app(argc, argv);
 
-    BrowserWindow* window = new BrowserWindow();
-    window->newWindow("http://www.google.com");
+    QStringList args = QApplication::arguments();
+    QStringList urls = args;
+    urls.removeAt(0);
+
+    if (urls.isEmpty()) {
+        QString defaultUrl = QString("file://%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
+        if (QDir(defaultUrl).exists())
+            urls.append(defaultUrl);
+        else
+            urls.append("http://www.google.com");
+    }
+
+    BrowserWindow* window = 0;
+    foreach (QString url, urls) {
+        window = new BrowserWindow();
+        window->newWindow(url);
+    }
 
     app.exec();
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list