Title: [97263] trunk/Source/WebKit2
Revision
97263
Author
commit-qu...@webkit.org
Date
2011-10-12 08:27:09 -0700 (Wed, 12 Oct 2011)

Log Message

[Qt][WK2] Move qweberror* out of API/qt
https://bugs.webkit.org/show_bug.cgi?id=69875

Patch by Jesus Sanchez-Palencia <jesus.palen...@openbossa.org> on 2011-10-12
Reviewed by Andreas Kling.

Moving QWebError outside API/qt in order to keep our API folder (layer) aligned.

* UIProcess/qt/qweberror.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror.cpp.
(QWebError::QWebError):
(QWebErrorPrivate::createQWebError):
(QWebErrorPrivate::QWebErrorPrivate):
(QWebErrorPrivate::~QWebErrorPrivate):
(QWebError::type):
(QWebError::errorCode):
(QWebError::url):
* UIProcess/qt/qweberror.h: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror.h.
(QWebError::errorCodeAsHttpStatusCode):
(QWebError::errorCodeAsNetworkError):
* UIProcess/qt/qweberror_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror_p.h.
* WebKit2.pro:
* WebKit2API.pri:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (97262 => 97263)


--- trunk/Source/WebKit2/ChangeLog	2011-10-12 14:58:18 UTC (rev 97262)
+++ trunk/Source/WebKit2/ChangeLog	2011-10-12 15:27:09 UTC (rev 97263)
@@ -1,3 +1,27 @@
+2011-10-12  Jesus Sanchez-Palencia  <jesus.palen...@openbossa.org>
+
+        [Qt][WK2] Move qweberror* out of API/qt
+        https://bugs.webkit.org/show_bug.cgi?id=69875
+
+        Reviewed by Andreas Kling.
+
+        Moving QWebError outside API/qt in order to keep our API folder (layer) aligned.
+
+        * UIProcess/qt/qweberror.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror.cpp.
+        (QWebError::QWebError):
+        (QWebErrorPrivate::createQWebError):
+        (QWebErrorPrivate::QWebErrorPrivate):
+        (QWebErrorPrivate::~QWebErrorPrivate):
+        (QWebError::type):
+        (QWebError::errorCode):
+        (QWebError::url):
+        * UIProcess/qt/qweberror.h: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror.h.
+        (QWebError::errorCodeAsHttpStatusCode):
+        (QWebError::errorCodeAsNetworkError):
+        * UIProcess/qt/qweberror_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qweberror_p.h.
+        * WebKit2.pro:
+        * WebKit2API.pri:
+
 2011-10-12  Nayan Kumar K  <naya...@motorola.com>
 
         [WebKit2][gtk] Add few more API's to gtk-doc section file.

Deleted: trunk/Source/WebKit2/UIProcess/API/qt/qweberror.cpp (97262 => 97263)


--- trunk/Source/WebKit2/UIProcess/API/qt/qweberror.cpp	2011-10-12 14:58:18 UTC (rev 97262)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qweberror.cpp	2011-10-12 15:27:09 UTC (rev 97263)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "config.h"
-#include "qweberror.h"
-
-#include "qweberror_p.h"
-#include <QtCore/QUrl>
-#include <WKSharedAPICast.h>
-#include <WKString.h>
-#include <WKStringQt.h>
-#include <WKType.h>
-#include <WKURL.h>
-#include <WKURLQt.h>
-
-using namespace WebKit;
-
-QWebError::QWebError(QWebErrorPrivate* priv)
-    : d(priv)
-{
-}
-
-QWebError::QWebError(const QWebError& other)
-    : d(other.d)
-{
-}
-
-QWebError QWebErrorPrivate::createQWebError(WKErrorRef errorRef)
-{
-    return QWebError(new QWebErrorPrivate(errorRef));
-}
-
-QWebErrorPrivate::QWebErrorPrivate(WKErrorRef errorRef)
-    : error(errorRef)
-{
-}
-
-QWebErrorPrivate::~QWebErrorPrivate()
-{
-}
-
-QWebError::Type QWebError::type() const
-{
-    WKRetainPtr<WKStringRef> errorDomainPtr = adoptWK(WKErrorCopyDomain(d->error.get()));
-    WTF::String errorDomain = toWTFString(errorDomainPtr.get());
-
-    if (errorDomain == "QtNetwork")
-        return QWebError::NetworkError;
-    if (errorDomain == "HTTP")
-        return QWebError::HttpError;
-    if (errorDomain == "Download")
-        return QWebError::DownloadError;
-    return QWebError::EngineError;
-}
-
-int QWebError::errorCode() const
-{
-    return WKErrorGetErrorCode(d->error.get());
-}
-
-QUrl QWebError::url() const
-{
-    WKRetainPtr<WKURLRef> failingURL = adoptWK(WKErrorCopyFailingURL(d->error.get()));
-    return WKURLCopyQUrl(failingURL.get());
-}

Deleted: trunk/Source/WebKit2/UIProcess/API/qt/qweberror.h (97262 => 97263)


--- trunk/Source/WebKit2/UIProcess/API/qt/qweberror.h	2011-10-12 14:58:18 UTC (rev 97262)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qweberror.h	2011-10-12 15:27:09 UTC (rev 97263)
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef qweberror_h
-#define qweberror_h
-
-#include "qwebkitglobal.h"
-#include <QSharedDataPointer>
-#include <QtNetwork/QNetworkReply>
-
-class QWebErrorPrivate;
-
-QT_BEGIN_NAMESPACE
-class QUrl;
-QT_END_NAMESPACE
-
-class QWEBKIT_EXPORT QWebError {
-public:
-    enum Type {
-        EngineError,
-        NetworkError,
-        HttpError,
-        DownloadError
-    };
-
-    Type type() const;
-    QUrl url() const;
-    int errorCode() const;
-
-    int errorCodeAsHttpStatusCode() const { return errorCode(); }
-    QNetworkReply::NetworkError errorCodeAsNetworkError() const { return static_cast<QNetworkReply::NetworkError>(errorCode()); }
-
-    QWebError(const QWebError&);
-
-private:
-    QWebError(QWebErrorPrivate*);
-
-    QSharedDataPointer<QWebErrorPrivate> d;
-    friend class QWebErrorPrivate;
-};
-
-#endif /* qweberror_h */

Deleted: trunk/Source/WebKit2/UIProcess/API/qt/qweberror_p.h (97262 => 97263)


--- trunk/Source/WebKit2/UIProcess/API/qt/qweberror_p.h	2011-10-12 14:58:18 UTC (rev 97262)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qweberror_p.h	2011-10-12 15:27:09 UTC (rev 97263)
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef qweberror_p_h
-#define qweberror_p_h
-
-#include "qweberror.h"
-#include <QtCore/QSharedData>
-#include <WKError.h>
-#include <WKRetainPtr.h>
-
-class QWebErrorPrivate : public QSharedData {
-public:
-    static QWebError createQWebError(WKErrorRef);
-    QWebErrorPrivate(WKErrorRef);
-    ~QWebErrorPrivate();
-
-    WKRetainPtr<WKErrorRef> error;
-};
-
-#endif /* qweberror_p_h */

Copied: trunk/Source/WebKit2/UIProcess/qt/qweberror.cpp (from rev 97262, trunk/Source/WebKit2/UIProcess/API/qt/qweberror.cpp) (0 => 97263)


--- trunk/Source/WebKit2/UIProcess/qt/qweberror.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/qt/qweberror.cpp	2011-10-12 15:27:09 UTC (rev 97263)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "qweberror.h"
+
+#include "qweberror_p.h"
+#include <QtCore/QUrl>
+#include <WKSharedAPICast.h>
+#include <WKString.h>
+#include <WKStringQt.h>
+#include <WKType.h>
+#include <WKURL.h>
+#include <WKURLQt.h>
+
+using namespace WebKit;
+
+QWebError::QWebError(QWebErrorPrivate* priv)
+    : d(priv)
+{
+}
+
+QWebError::QWebError(const QWebError& other)
+    : d(other.d)
+{
+}
+
+QWebError QWebErrorPrivate::createQWebError(WKErrorRef errorRef)
+{
+    return QWebError(new QWebErrorPrivate(errorRef));
+}
+
+QWebErrorPrivate::QWebErrorPrivate(WKErrorRef errorRef)
+    : error(errorRef)
+{
+}
+
+QWebErrorPrivate::~QWebErrorPrivate()
+{
+}
+
+QWebError::Type QWebError::type() const
+{
+    WKRetainPtr<WKStringRef> errorDomainPtr = adoptWK(WKErrorCopyDomain(d->error.get()));
+    WTF::String errorDomain = toWTFString(errorDomainPtr.get());
+
+    if (errorDomain == "QtNetwork")
+        return QWebError::NetworkError;
+    if (errorDomain == "HTTP")
+        return QWebError::HttpError;
+    if (errorDomain == "Download")
+        return QWebError::DownloadError;
+    return QWebError::EngineError;
+}
+
+int QWebError::errorCode() const
+{
+    return WKErrorGetErrorCode(d->error.get());
+}
+
+QUrl QWebError::url() const
+{
+    WKRetainPtr<WKURLRef> failingURL = adoptWK(WKErrorCopyFailingURL(d->error.get()));
+    return WKURLCopyQUrl(failingURL.get());
+}

Copied: trunk/Source/WebKit2/UIProcess/qt/qweberror.h (from rev 97262, trunk/Source/WebKit2/UIProcess/API/qt/qweberror.h) (0 => 97263)


--- trunk/Source/WebKit2/UIProcess/qt/qweberror.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/qt/qweberror.h	2011-10-12 15:27:09 UTC (rev 97263)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef qweberror_h
+#define qweberror_h
+
+#include "qwebkitglobal.h"
+#include <QSharedDataPointer>
+#include <QtNetwork/QNetworkReply>
+
+class QWebErrorPrivate;
+
+QT_BEGIN_NAMESPACE
+class QUrl;
+QT_END_NAMESPACE
+
+class QWebError {
+public:
+    enum Type {
+        EngineError,
+        NetworkError,
+        HttpError,
+        DownloadError
+    };
+
+    Type type() const;
+    QUrl url() const;
+    int errorCode() const;
+
+    int errorCodeAsHttpStatusCode() const { return errorCode(); }
+    QNetworkReply::NetworkError errorCodeAsNetworkError() const { return static_cast<QNetworkReply::NetworkError>(errorCode()); }
+
+    QWebError(const QWebError&);
+
+private:
+    QWebError(QWebErrorPrivate*);
+
+    QSharedDataPointer<QWebErrorPrivate> d;
+    friend class QWebErrorPrivate;
+};
+
+#endif /* qweberror_h */

Copied: trunk/Source/WebKit2/UIProcess/qt/qweberror_p.h (from rev 97262, trunk/Source/WebKit2/UIProcess/API/qt/qweberror_p.h) (0 => 97263)


--- trunk/Source/WebKit2/UIProcess/qt/qweberror_p.h	                        (rev 0)
+++ trunk/Source/WebKit2/UIProcess/qt/qweberror_p.h	2011-10-12 15:27:09 UTC (rev 97263)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this program; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef qweberror_p_h
+#define qweberror_p_h
+
+#include "qweberror.h"
+#include <QtCore/QSharedData>
+#include <WKError.h>
+#include <WKRetainPtr.h>
+
+class QWebErrorPrivate : public QSharedData {
+public:
+    static QWebError createQWebError(WKErrorRef);
+    QWebErrorPrivate(WKErrorRef);
+    ~QWebErrorPrivate();
+
+    WKRetainPtr<WKErrorRef> error;
+};
+
+#endif /* qweberror_p_h */

Modified: trunk/Source/WebKit2/WebKit2.pro (97262 => 97263)


--- trunk/Source/WebKit2/WebKit2.pro	2011-10-12 14:58:18 UTC (rev 97262)
+++ trunk/Source/WebKit2/WebKit2.pro	2011-10-12 15:27:09 UTC (rev 97263)
@@ -254,6 +254,8 @@
     UIProcess/qt/QtPinchGestureRecognizer.h \
     UIProcess/qt/qdesktopwebpageproxy.h \
     UIProcess/qt/qtouchwebpageproxy.h \
+    UIProcess/qt/qweberror.h \
+    UIProcess/qt/qweberror_p.h \
     UIProcess/qt/QtWebPageProxy.h \
     UIProcess/qt/qwkhistory.h \
     UIProcess/qt/qwkhistory_p.h \
@@ -492,6 +494,7 @@
     UIProcess/qt/QtPinchGestureRecognizer.cpp \
     UIProcess/qt/qdesktopwebpageproxy.cpp \
     UIProcess/qt/qtouchwebpageproxy.cpp \
+    UIProcess/qt/qweberror.cpp \
     UIProcess/qt/QtWebPageProxy.cpp \
     UIProcess/qt/qwkhistory.cpp \
     UIProcess/qt/qwkpreferences.cpp \

Modified: trunk/Source/WebKit2/WebKit2API.pri (97262 => 97263)


--- trunk/Source/WebKit2/WebKit2API.pri	2011-10-12 14:58:18 UTC (rev 97262)
+++ trunk/Source/WebKit2/WebKit2API.pri	2011-10-12 15:27:09 UTC (rev 97263)
@@ -51,7 +51,6 @@
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp \
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp \
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qtouchwebview.cpp \
-    $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qweberror.cpp \
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qwebnavigationcontroller.cpp \
     $$SOURCE_DIR/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp \
     $$SOURCE_DIR/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp \
@@ -134,8 +133,6 @@
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qtouchwebview.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qtouchwebview_p.h \
-    $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qweberror.h \
-    $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qweberror_p.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qwebkittypes.h \
     $$SOURCE_DIR/WebKit2/UIProcess/API/qt/qwebnavigationcontroller.h \
     $$SOURCE_DIR/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to