https://bugs.webkit.org/show_bug.cgi?id=70550
Reviewed by Noam Rosenthal.
Renaming qweberror* files and class to QtWebError*.
QWebErrorPrivate is now merged into QtWebError.
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::loadDidFail):
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/qt/ClientImpl.cpp:
(dispatchLoadFailed):
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::loadDidFail):
* UIProcess/qt/QtTouchViewInterface.h:
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtWebError.cpp: Renamed from Source/WebKit2/UIProcess/qt/qweberror.cpp.
(QtWebError::QtWebError):
(QtWebError::type):
(QtWebError::errorCode):
(QtWebError::url):
* UIProcess/qt/QtWebError.h: Renamed from Source/WebKit2/UIProcess/qt/qweberror.h.
(QtWebError::errorCodeAsHttpStatusCode):
(QtWebError::errorCodeAsNetworkError):
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::loadDidFail):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/qweberror_p.h: Removed.
* WebKit2.pro:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98030
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-10-20 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ [Qt][WK2] qweberror* should follow the new file and class naming rules
+ https://bugs.webkit.org/show_bug.cgi?id=70550
+
+ Reviewed by Noam Rosenthal.
+
+ Renaming qweberror* files and class to QtWebError*.
+ QWebErrorPrivate is now merged into QtWebError.
+
+ * UIProcess/API/qt/qdesktopwebview.cpp:
+ (QDesktopWebViewPrivate::loadDidFail):
+ * UIProcess/API/qt/qdesktopwebview_p.h:
+ * UIProcess/qt/ClientImpl.cpp:
+ (dispatchLoadFailed):
+ * UIProcess/qt/QtTouchViewInterface.cpp:
+ (WebKit::QtTouchViewInterface::loadDidFail):
+ * UIProcess/qt/QtTouchViewInterface.h:
+ * UIProcess/qt/QtViewInterface.h:
+ * UIProcess/qt/QtWebError.cpp: Renamed from Source/WebKit2/UIProcess/qt/qweberror.cpp.
+ (QtWebError::QtWebError):
+ (QtWebError::type):
+ (QtWebError::errorCode):
+ (QtWebError::url):
+ * UIProcess/qt/QtWebError.h: Renamed from Source/WebKit2/UIProcess/qt/qweberror.h.
+ (QtWebError::errorCodeAsHttpStatusCode):
+ (QtWebError::errorCodeAsNetworkError):
+ * UIProcess/qt/QtWebPageProxy.cpp:
+ (QtWebPageProxy::loadDidFail):
+ * UIProcess/qt/QtWebPageProxy.h:
+ * UIProcess/qt/qweberror_p.h: Removed.
+ * WebKit2.pro:
+
2011-10-20 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r96823): Contextual menu closes immediately when control-clicking in Flash plug-in
#include "config.h"
#include "qdesktopwebview.h"
+#include "QtWebError.h"
#include "UtilsQt.h"
#include "qdesktopwebview_p.h"
-#include "qweberror.h"
#include <QFileDialog>
#include <QGraphicsSceneEvent>
#include <QGraphicsSceneResizeEvent>
emit q->loadSucceeded();
}
-void QDesktopWebViewPrivate::loadDidFail(const QWebError& error)
+void QDesktopWebViewPrivate::loadDidFail(const QtWebError& error)
{
emit q->loadFailed(static_cast<QDesktopWebView::ErrorType>(error.type()), error.errorCode(), error.url());
}
virtual void loadDidBegin();
virtual void loadDidCommit();
virtual void loadDidSucceed();
- virtual void loadDidFail(const QWebError&);
+ virtual void loadDidFail(const QtWebError&);
virtual void didChangeLoadProgress(int);
virtual void showContextMenu(QSharedPointer<QMenu>);
#include "config.h"
#include "ClientImpl.h"
+#include "QtWebError.h"
#include "WebFrameProxy.h"
#include "WKAPICast.h"
#include "WKStringQt.h"
#include "WKURLQt.h"
-#include "qweberror.h"
-#include "qweberror_p.h"
#include <QtPolicyInterface.h>
#include <QtViewInterface.h>
#include <QtWebPageProxy.h>
if (toImpl(error)->platformError().isCancellation() || errorCode == kWKErrorCodeFrameLoadInterruptedByPolicyChange || errorCode == kWKErrorCodePlugInWillHandleLoad)
return;
- toQtWebPageProxy(clientInfo)->loadDidFail(QWebErrorPrivate::createQWebError(error));
+ toQtWebPageProxy(clientInfo)->loadDidFail(QtWebError(error));
}
void qt_wk_didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
#include "config.h"
#include "QtTouchViewInterface.h"
+#include "QtWebError.h"
#include "qtouchwebpage.h"
#include "qtouchwebpage_p.h"
#include "qtouchwebview.h"
#include "qtouchwebview_p.h"
-#include "qweberror.h"
#include <QDeclarativeEngine>
#include <QSGView>
emit m_pageView->loadSucceeded();
}
-void QtTouchViewInterface::loadDidFail(const QWebError& error)
+void QtTouchViewInterface::loadDidFail(const QtWebError& error)
{
emit m_pageView->loadFailed(static_cast<QTouchWebPage::ErrorType>(error.type()), error.errorCode(), error.url());
}
virtual void loadDidBegin();
virtual void loadDidCommit();
virtual void loadDidSucceed();
- virtual void loadDidFail(const QWebError&);
+ virtual void loadDidFail(const QtWebError&);
virtual void didChangeLoadProgress(int);
virtual void showContextMenu(QSharedPointer<QMenu>);
#include <QtCore/QSize>
#include <WebKit2/WKBase.h>
-class QWebError;
+class QtWebError;
QT_BEGIN_NAMESPACE
class QCursor;
virtual void loadDidBegin() = 0;
virtual void loadDidCommit() = 0;
virtual void loadDidSucceed() = 0;
- virtual void loadDidFail(const QWebError&) = 0;
+ virtual void loadDidFail(const QtWebError&) = 0;
virtual void didChangeLoadProgress(int) = 0;
virtual void showContextMenu(QSharedPointer<QMenu>) = 0;
*/
#include "config.h"
-#include "qweberror.h"
+#include "QtWebError.h"
-#include "qweberror_p.h"
#include <QtCore/QUrl>
#include <WKSharedAPICast.h>
#include <WKString.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)
+QtWebError::QtWebError(WKErrorRef errorRef)
: error(errorRef)
{
}
-QWebErrorPrivate::~QWebErrorPrivate()
-{
-}
-
-QWebError::Type QWebError::type() const
+QtWebError::Type QtWebError::type() const
{
- WKRetainPtr<WKStringRef> errorDomainPtr = adoptWK(WKErrorCopyDomain(d->error.get()));
+ WKRetainPtr<WKStringRef> errorDomainPtr = adoptWK(WKErrorCopyDomain(error.get()));
WTF::String errorDomain = toWTFString(errorDomainPtr.get());
if (errorDomain == "QtNetwork")
- return QWebError::NetworkError;
+ return QtWebError::NetworkError;
if (errorDomain == "HTTP")
- return QWebError::HttpError;
+ return QtWebError::HttpError;
if (errorDomain == "Download")
- return QWebError::DownloadError;
- return QWebError::EngineError;
+ return QtWebError::DownloadError;
+ return QtWebError::EngineError;
}
-int QWebError::errorCode() const
+int QtWebError::errorCode() const
{
- return WKErrorGetErrorCode(d->error.get());
+ return WKErrorGetErrorCode(error.get());
}
-QUrl QWebError::url() const
+QUrl QtWebError::url() const
{
- WKRetainPtr<WKURLRef> failingURL = adoptWK(WKErrorCopyFailingURL(d->error.get()));
+ WKRetainPtr<WKURLRef> failingURL = adoptWK(WKErrorCopyFailingURL(error.get()));
return WKURLCopyQUrl(failingURL.get());
}
*
*/
-#ifndef qweberror_h
-#define qweberror_h
+#ifndef QtWebError_h
+#define QtWebError_h
#include "qwebkitglobal.h"
-#include <QSharedDataPointer>
#include <QtNetwork/QNetworkReply>
-
-class QWebErrorPrivate;
+#include <WKError.h>
+#include <WKRetainPtr.h>
QT_BEGIN_NAMESPACE
class QUrl;
QT_END_NAMESPACE
-class QWebError {
+class QtWebError {
public:
enum Type {
EngineError,
int errorCodeAsHttpStatusCode() const { return errorCode(); }
QNetworkReply::NetworkError errorCodeAsNetworkError() const { return static_cast<QNetworkReply::NetworkError>(errorCode()); }
- QWebError(const QWebError&);
+ QtWebError(const QtWebError&);
-private:
- QWebError(QWebErrorPrivate*);
+ QtWebError(WKErrorRef);
- QSharedDataPointer<QWebErrorPrivate> d;
- friend class QWebErrorPrivate;
+private:
+ WKRetainPtr<WKErrorRef> error;
};
-#endif /* qweberror_h */
+#endif /* QtWebError_h */
#include "config.h"
#include "QtWebPageProxy.h"
-#include "qweberror.h"
+#include "QtWebError.h"
#include "qwebpreferences_p.h"
#include "ClientImpl.h"
m_viewInterface->loadDidSucceed();
}
-void QtWebPageProxy::loadDidFail(const QWebError& error)
+void QtWebPageProxy::loadDidFail(const QtWebError& error)
{
m_viewInterface->loadDidFail(error);
}
class QUndoStack;
QT_END_NAMESPACE
-class QWebError;
+class QtWebError;
class QWebPreferences;
class QWKHistory;
void loadDidBegin();
void loadDidCommit();
void loadDidSucceed();
- void loadDidFail(const QWebError&);
+ void loadDidFail(const QtWebError&);
void didChangeLoadProgress(int);
int loadProgress() const { return m_loadProgress; }
+++ /dev/null
-/*
- * Copyright (C) 2011 Andreas Kling <kling@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 */
UIProcess/qt/QtPinchGestureRecognizer.h \
UIProcess/qt/QtDesktopWebPageProxy.h \
UIProcess/qt/QtTouchWebPageProxy.h \
- UIProcess/qt/qweberror.h \
- UIProcess/qt/qweberror_p.h \
+ UIProcess/qt/QtWebError.h \
UIProcess/qt/QtWebPageProxy.h \
UIProcess/qt/qwkhistory.h \
UIProcess/qt/qwkhistory_p.h \
UIProcess/qt/QtPinchGestureRecognizer.cpp \
UIProcess/qt/QtDesktopWebPageProxy.cpp \
UIProcess/qt/QtTouchWebPageProxy.cpp \
- UIProcess/qt/qweberror.cpp \
+ UIProcess/qt/QtWebError.cpp \
UIProcess/qt/QtWebPageProxy.cpp \
UIProcess/qt/qwkhistory.cpp \
UIProcess/qt/QtSGUpdateQueue.cpp \