Title: [121324] trunk/Source/WebKit/qt
Revision
121324
Author
hausm...@webkit.org
Date
2012-06-27 00:26:34 -0700 (Wed, 27 Jun 2012)

Log Message

[Qt] Fix compilation of example platform plugin with Qt 5

Reviewed by Kenneth Christiansen.

Use QLatin1String where appropriate and use the Qt 5 plugin
system with Qt 5.

* examples/platformplugin/WebPlugin.cpp:
(SingleSelectionPopup::SingleSelectionPopup):
(MultipleItemListDelegate::MultipleItemListDelegate):
(MultipleSelectionPopup::MultipleSelectionPopup):
* examples/platformplugin/WebPlugin.h:
(WebPlugin):

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/ChangeLog (121323 => 121324)


--- trunk/Source/WebKit/qt/ChangeLog	2012-06-27 07:09:30 UTC (rev 121323)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-06-27 07:26:34 UTC (rev 121324)
@@ -1,3 +1,19 @@
+2012-06-27  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        [Qt] Fix compilation of example platform plugin with Qt 5
+
+        Reviewed by Kenneth Christiansen.
+
+        Use QLatin1String where appropriate and use the Qt 5 plugin
+        system with Qt 5.
+
+        * examples/platformplugin/WebPlugin.cpp:
+        (SingleSelectionPopup::SingleSelectionPopup):
+        (MultipleItemListDelegate::MultipleItemListDelegate):
+        (MultipleSelectionPopup::MultipleSelectionPopup):
+        * examples/platformplugin/WebPlugin.h:
+        (WebPlugin):
+
 2012-06-26  Tony Chang  <t...@chromium.org>
 
         [Qt] Enable grid layout LayoutTests

Modified: trunk/Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp (121323 => 121324)


--- trunk/Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp	2012-06-27 07:09:30 UTC (rev 121323)
+++ trunk/Source/WebKit/qt/examples/platformplugin/WebPlugin.cpp	2012-06-27 07:26:34 UTC (rev 121324)
@@ -126,7 +126,7 @@
     if (qstrcmp(title, "weba_ti_texlist_single"))
         setWindowTitle(QString::fromUtf8(title));
     else
-        setWindowTitle("Select item");
+        setWindowTitle(QLatin1String("Select item"));
 
     QHBoxLayout* hLayout = new QHBoxLayout(this);
     hLayout->setContentsMargins(0, 0, 0, 0);
@@ -150,7 +150,7 @@
     MultipleItemListDelegate(QObject* parent = 0)
            : QStyledItemDelegate(parent)
     {
-        tickMark = QIcon::fromTheme("widgets_tickmark_list").pixmap(48, 48);
+        tickMark = QIcon::fromTheme(QLatin1String("widgets_tickmark_list")).pixmap(48, 48);
     }
 
     void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
@@ -172,7 +172,7 @@
     if (qstrcmp(title, "weba_ti_textlist_multi"))
         setWindowTitle(QString::fromUtf8(title));
     else
-        setWindowTitle("Select items");
+        setWindowTitle(QLatin1String("Select items"));
 
     QHBoxLayout* hLayout = new QHBoxLayout(this);
     hLayout->setContentsMargins(0, 0, 0, 0);
@@ -197,7 +197,7 @@
     if (qstrcmp(title, "wdgt_bd_done"))
         done->setText(QString::fromUtf8(title));
     else
-        done->setText("Done");
+        done->setText(QLatin1String("Done"));
 
     done->setMinimumWidth(178);
     vLayout->addWidget(done);
@@ -315,4 +315,6 @@
     }
 }
 
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
 Q_EXPORT_PLUGIN2(platformplugin, WebPlugin)
+#endif

Modified: trunk/Source/WebKit/qt/examples/platformplugin/WebPlugin.h (121323 => 121324)


--- trunk/Source/WebKit/qt/examples/platformplugin/WebPlugin.h	2012-06-27 07:09:30 UTC (rev 121323)
+++ trunk/Source/WebKit/qt/examples/platformplugin/WebPlugin.h	2012-06-27 07:26:34 UTC (rev 121324)
@@ -137,6 +137,9 @@
 {
     Q_OBJECT
     Q_INTERFACES(QWebKitPlatformPlugin)
+#if QT_VERSION >= 0x050000
+    Q_PLUGIN_METADATA(IID "org.qt-project.QtWebKit.PlatformPluginInterface")
+#endif
 public:
     virtual bool supportsExtension(Extension extension) const;
     virtual QObject* createExtension(Extension extension) const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to