summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-10 13:08:05 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-10 13:08:05 +0200
commit81cbb264cb9446c4408124d50aeff50164ad0ab4 (patch)
tree6acc39b8ea0165562d480f1c54608c6c4ae9f865 /Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
parentbeaeeb99881184fd368c121fcbb1a31c78b794a3 (diff)
parent5087e0ced43d813eb6f765913a6fc3958d2a7a9d (diff)
downloadqtwebkit-81cbb264cb9446c4408124d50aeff50164ad0ab4.tar.gz
Merge remote-tracking branch 'origin/5.212' into dev
Change-Id: I4e185b15690118515df80a79b786cbb8b30dd144
Diffstat (limited to 'Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp')
-rw-r--r--Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
index 031c32d9e..c37099654 100644
--- a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "WebColorPickerQt.h"
+#include "ColorChooserContextObject.h"
#include "qquickwebview_p.h"
#include "qquickwebview_p_p.h"
#include <QtQml/QQmlContext>
@@ -31,33 +32,6 @@ using namespace WebCore;
namespace WebKit {
-class ColorChooserContextObject : public QObject {
- Q_OBJECT
- Q_PROPERTY(QColor currentColor READ currentColor CONSTANT FINAL)
- Q_PROPERTY(QRectF elementRect READ elementRect CONSTANT FINAL)
-
-public:
- ColorChooserContextObject(const QColor& color, const QRectF& rect)
- : m_currentColor(color)
- , m_rect(rect)
- {
- }
-
- QColor currentColor() const { return m_currentColor; }
- QRectF elementRect() const { return m_rect; }
-
- Q_INVOKABLE void accept(const QColor& color) { emit accepted(color); }
- Q_INVOKABLE void reject() { emit rejected(); }
-
-Q_SIGNALS:
- void accepted(const QColor&);
- void rejected();
-
-private:
- QColor m_currentColor;
- QRectF m_rect;
-};
-
WebColorPickerQt::WebColorPickerQt(WebColorPicker::Client* client, QQuickWebView* webView, const Color& initialColor, const IntRect& elementRect)
: WebColorPicker(client)
, m_webView(webView)
@@ -149,5 +123,4 @@ void WebColorPickerQt::endPicker()
} // namespace WebKit
-#include "WebColorPickerQt.moc"
#include "moc_WebColorPickerQt.cpp"