Skip to content

Instantly share code, notes, and snippets.

// class QupZilla
#ifndef Q_OS_MAC
#define MENU_RECEIVER this
#else
#define MENU_RECEIVER mApp->macMenuReceiver()
#endif
void QupZilla::createMenu()
{
ViewSourceSchemeHandler::ViewSourceSchemeHandler()
{
}
QNetworkReply* ViewSourceSchemeHandler::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData)
{
Q_UNUSED(outgoingData)
if (op != QNetworkAccessManager::GetOperation) {
return 0;
diff --git a/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri b/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri
index 1c80a78..9418f28 100644
--- a/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri
+++ b/src/lib/plugins/qtwebkit/qtwebkit-plugins.pri
@@ -24,5 +24,16 @@ unix:contains(DEFINES, USE_QTWEBKIT_2_3):system(pkg-config --exists hunspell) {
}
win{
-# TODO
+ HEADERS += $$PWD/spellcheck/spellcheck.h \
diff --git a/Source/WebCore/DerivedSources.pri b/Source/WebCore/DerivedSources.pri
index 2c819ab..c5899fe 100644
--- a/Source/WebCore/DerivedSources.pri
+++ b/Source/WebCore/DerivedSources.pri
@@ -830,11 +830,18 @@ arrayBufferViewCustomScript.commands = perl $$PWD/inspector/xxd.pl V8ArrayBuffer
arrayBufferViewCustomScript.add_output_to_sources = false
GENERATORS += arrayBufferViewCustomScript
+# Workaround for MSVC
+win32-msvc* {
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 0f2f595..e5d6b15 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -113,9 +113,40 @@ void qupzilla_signal_handler(int s)
}
#endif
+void msgHandler(QtMsgType type, const char *msg)
+{
@nowrep
nowrep / page_visibility.patch
Created February 16, 2013 13:16
Page Visibility API for QtWebKit 2.3 modified patch from https://bugs.webkit.org/show_bug.cgi?id=109422
4926e111898c9e2e2da040b1c2776e0c5503afb1
diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp
index 053c4d8..aacad16 100644
--- a/Source/WebKit/qt/Api/qwebpage.cpp
+++ b/Source/WebKit/qt/Api/qwebpage.cpp
@@ -674,6 +674,18 @@ void QWebPagePrivate::updateEditorActions()
updateAction(QWebPage::AlignRight);
}
+void QWebPagePrivate::setVisibilityState(int visibilityState, bool isInitialState)
@nowrep
nowrep / mediacontrols.patch
Created February 18, 2013 14:44
QtWebKit 2.3
diff --git a/Source/WebCore/css/mediaControlsQt.css b/Source/WebCore/css/mediaControlsQt.css
index 505c7ce..12bb61f 100644
--- a/Source/WebCore/css/mediaControlsQt.css
+++ b/Source/WebCore/css/mediaControlsQt.css
@@ -22,7 +22,7 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@nowrep
nowrep / moneypolo.php
Last active December 14, 2015 03:19
Extract currency rates from moneypolo.cz
<?php
class MoneyPoloRates
{
public $EUR;
public $GBP;
public $USD;
private $reply;
private $error = true;
private $errorMessage;
typedef QPair<QString, QString> QueryItem;
QUrl mailto("mailto:someone@example.com?cc=mail@example.com&bcc=mail2@example.com&subject=Isn't this really cool?&body=These mailto links are really cool! Right? Yeah, they are really great... :D");
QUrl gmail("https://mail.google.com/mail/?view=cm&fs=1&tf=1&source=mailto");
gmail.addQueryItem("to", mailto.toEncoded(QUrl::RemoveQuery | QUrl::RemoveScheme));
foreach (QueryItem item, mailto.queryItems()) {
if (item.first == "subject") {
gmail.addQueryItem("su", item.second);
diff --git a/src/defines.pri b/src/defines.pri
index 4755adf..b83ce42 100644
--- a/src/defines.pri
+++ b/src/defines.pri
@@ -7,6 +7,9 @@ UI_DIR = $$PWD/../build
# workaround for #849: see https://bugreports.qt-project.org/browse/QTBUG-23196
mocinclude.CONFIG *= fix_target
+# workaround for https://bugreports.qt-project.org/browse/QTBUG-34950
+CONFIG -= gdb_dwarf_index