diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/configure QtWeb/src/qt/configure
--- qt-everywhere-opensource-src-4.8.5/configure	2013-06-07 08:16:42.000000000 +0800
+++ QtWeb/src/qt/configure	2013-06-15 11:27:02.766750000 +0800
@@ -7767,17 +7767,10 @@
 if [ "$CFG_GUI" = "no" ]; then
     # WebKit requires QtGui
     canBuildWebKit="no"
 fi
 
-if [ "$CFG_SHARED" = "no" ]; then
-    echo
-    echo "WARNING: Using static linking will disable the WebKit module."
-    echo
-    canBuildWebKit="no"
-fi
-
 CFG_CONCURRENT="yes"
 if [ "$canBuildQtConcurrent" = "no" ]; then
     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
     CFG_CONCURRENT="no"
 else
@@ -7822,12 +7815,12 @@
     QT_CONFIG="$QT_CONFIG svg"
 else
     QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SVG"
 fi
 
-if [ "$CFG_WEBKIT" != "no" ]; then
-    CFG_WEBKIT="$canBuildWebKit"
+if [ "$canBuildWebKit" == "no" ]; then
+    CFG_WEBKIT="no"
 fi
 
 if [ "$CFG_WEBKIT" != "no" ]; then
     # This include takes care of adding "webkit" to QT_CONFIG.
     cp -f "$relpath/src/3rdparty/webkit/Source/WebKit/qt/qt_webkit_version.pri" "$outpath/mkspecs/modules/qt_webkit_version.pri"
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/configure.cache QtWeb/src/qt/configure.cache
--- qt-everywhere-opensource-src-4.8.5/configure.cache	2013-06-20 11:40:19.011500000 +0800
+++ QtWeb/src/qt/configure.cache	2013-06-21 09:35:53.918250000 +0800
@@ -1,11 +1,12 @@
 -prefix 
-G:\qt-everywhere-opensource-src-4.8.5 
+G:\QtWeb\src\qt 
 -opensource 
 -confirm-license 
+-static 
 -webkit 
--debug 
+-release 
 -fast 
 -nomake 
 demos 
 -nomake 
 docs 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/demos/browser/browser.pro QtWeb/src/qt/demos/browser/browser.pro
--- qt-everywhere-opensource-src-4.8.5/demos/browser/browser.pro	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/demos/browser/browser.pro	2013-06-21 12:11:50.967875000 +0800
@@ -1,8 +1,9 @@
 TEMPLATE = app
 TARGET = browser
-QT += webkit network
+QT += webkit xml xmlpatterns network
+QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs
 
 CONFIG += qt warn_on
 contains(QT_BUILD_PARTS, tools):!embedded: CONFIG += uitools
 else: DEFINES += QT_NO_UITOOLS
 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/demos/browser/browsermainwindow.cpp QtWeb/src/qt/demos/browser/browsermainwindow.cpp
--- qt-everywhere-opensource-src-4.8.5/demos/browser/browsermainwindow.cpp	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/demos/browser/browsermainwindow.cpp	2013-06-21 14:38:25.272125000 +0800
@@ -64,11 +64,11 @@
 #include <QtGui/QMenuBar>
 #include <QtGui/QMessageBox>
 #include <QtGui/QStatusBar>
 #include <QtGui/QToolBar>
 #include <QtGui/QInputDialog>
-
+#include <QTextCodec>
 #include <QtWebKit/QWebFrame>
 #include <QtWebKit/QWebHistory>
 
 #include <QtCore/QDebug>
 
@@ -78,10 +78,11 @@
     , m_autoSaver(new AutoSaver(this))
     , m_historyBack(0)
     , m_historyForward(0)
     , m_stop(0)
     , m_reload(0)
+    , m_encodingMenu(0)
 {
     setToolButtonStyle(Qt::ToolButtonFollowStyle);
     setAttribute(Qt::WA_DeleteOnClose, true);
     statusBar()->setSizeGripEnabled(true);
     setupMenu();
@@ -365,10 +366,16 @@
     viewMenu->addSeparator();
     viewMenu->addAction(tr("Page S&ource"), this, SLOT(slotViewPageSource()), tr("Ctrl+Alt+U"));
     QAction *a = viewMenu->addAction(tr("&Full Screen"), this, SLOT(slotViewFullScreen(bool)),  Qt::Key_F11);
     a->setCheckable(true);
 
+    viewMenu->addSeparator();
+    // Text Encoding
+    m_encodingMenu = viewMenu->addMenu( tr("&Encoding") );
+    connect(m_encodingMenu, SIGNAL(aboutToShow()),
+            this, SLOT(slotAboutToShowEncodingMenu()));
+
     // History
     HistoryMenu *historyMenu = new HistoryMenu(this);
     connect(historyMenu, SIGNAL(openUrl(QUrl)),
             m_tabWidget, SLOT(loadUrlInCurrentTab(QUrl)));
     connect(historyMenu, SIGNAL(hovered(QString)), this,
@@ -548,10 +555,105 @@
         statusBar()->show();
     }
     m_autoSaver->changeOccurred();
 }
 
+QAction* BrowserMainWindow::menuAddEncoding(QString name, QString encoding)
+{
+    QAction* a = m_encodingMenu->addAction(name + " (" + encoding + ")", this, SLOT(slotEncodingChange( )));
+    a->setCheckable(true);
+    a->setStatusTip( encoding );
+    if (encoding == m_currentEncoding)
+        a->setChecked(true);
+
+    return a;
+}
+
+void BrowserMainWindow::slotAboutToShowEncodingMenu()
+{
+    if (!m_encodingMenu)
+        return;
+
+    m_encodingMenu->clear();
+
+    QActionGroup* alignmentGroup = new QActionGroup(this);
+    alignmentGroup->setExclusive(true);
+
+    QAction* a = m_encodingMenu->addAction("Auto Detect", this, SLOT(slotEncodingChange( )));
+    alignmentGroup->addAction(a);
+    a->setCheckable(true);
+    if (m_currentEncoding == "")
+        a->setChecked(true);
+
+    alignmentGroup->addAction(menuAddEncoding("Unicode",    "UTF-8"));
+    alignmentGroup->addAction(menuAddEncoding("Western",    "ISO-8859-1"));
+    alignmentGroup->addAction(menuAddEncoding("Western",    "windows-1252"));
+    alignmentGroup->addAction(menuAddEncoding("Cyrillic",   "windows-1251"));
+    alignmentGroup->addAction(menuAddEncoding("Cyrillic",   "KOI8-R"));
+    m_encodingMenu->addSeparator();
+
+    alignmentGroup->addAction(menuAddEncoding("Unicode",    "UTF-16LE"));
+    m_encodingMenu->addSeparator();
+
+    alignmentGroup->addAction(menuAddEncoding("Western",    "ISO-8859-15"));
+    alignmentGroup->addAction(menuAddEncoding("Western",    "macintosh"));
+    alignmentGroup->addAction(menuAddEncoding("Central European", "ISO-8859-2"));
+    alignmentGroup->addAction(menuAddEncoding("Central European", "windows-1250"));
+    m_encodingMenu->addSeparator();
+
+    // chinese
+    alignmentGroup->addAction(menuAddEncoding("Chinese Simplified",     "GBK"));
+    alignmentGroup->addAction(menuAddEncoding("Chinese Simplified",     "GB2312"));
+    alignmentGroup->addAction(menuAddEncoding("Chinese Traditional",    "Big5"));
+    // korean
+    alignmentGroup->addAction(menuAddEncoding("Korean", "EUC-KR"));
+    // japanese
+    alignmentGroup->addAction(menuAddEncoding("Japanese",   "Shift_JIS"));
+    alignmentGroup->addAction(menuAddEncoding("Japanese",   "EUC-JP"));
+    alignmentGroup->addAction(menuAddEncoding("Japanese",   "ISO-2022-JP"));
+    m_encodingMenu->addSeparator();
+
+    alignmentGroup->addAction(menuAddEncoding("Cyrillic",   "ISO-8859-5"));
+    alignmentGroup->addAction(menuAddEncoding("Cyrillic",   "KOI8-U"));
+    m_encodingMenu->addSeparator();
+
+    alignmentGroup->addAction(menuAddEncoding("Greek",      "ISO-8859-7"));
+    alignmentGroup->addAction(menuAddEncoding("Greek",      "windows-1253"));
+    alignmentGroup->addAction(menuAddEncoding("Turkish",    "ISO-8859-9"));
+    alignmentGroup->addAction(menuAddEncoding("Turkish",    "windows-1254"));
+    alignmentGroup->addAction(menuAddEncoding("Arabic",     "ISO-8859-6"));
+    alignmentGroup->addAction(menuAddEncoding("Arabic",     "windows-1256"));
+    alignmentGroup->addAction(menuAddEncoding("Hebrew",     "ISO-8859-8"));
+    alignmentGroup->addAction(menuAddEncoding("Hebrew",     "windows-1255"));
+    alignmentGroup->addAction(menuAddEncoding("Vietnamese", "windows-1258"));
+    alignmentGroup->addAction(menuAddEncoding("Baltic",     "ISO-8859-4"));
+    alignmentGroup->addAction(menuAddEncoding("Baltic",     "ISO-8859-13"));
+    alignmentGroup->addAction(menuAddEncoding("Baltic",     "windows-1257"));
+    alignmentGroup->addAction(menuAddEncoding("South European", "ISO-8859-3"));
+    alignmentGroup->addAction(menuAddEncoding("Nordic",     "ISO-8859-10"));
+    alignmentGroup->addAction(menuAddEncoding("Celtic",     "ISO-8859-14"));
+    alignmentGroup->addAction(menuAddEncoding("Romanian",   "ISO-8859-16"));
+    //alignmentGroup->addAction(menuAddEncoding("",     ""));
+}
+
+void BrowserMainWindow::slotEncodingChange()
+{
+    QAction *action = qobject_cast<QAction *>(sender());
+    if (!action)
+        return;
+
+    m_currentEncoding = action->statusTip();
+    QWebSettings::globalSettings()->setDefaultTextEncoding(m_currentEncoding);
+
+    WebView *view = currentTab();
+    if (!view)
+        return;
+
+    view->reload();
+
+}
+
 void BrowserMainWindow::loadUrl(const QUrl &url)
 {
     if (!currentTab() || !url.isValid())
         return;
 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/demos/browser/browsermainwindow.h QtWeb/src/qt/demos/browser/browsermainwindow.h
--- qt-everywhere-opensource-src-4.8.5/demos/browser/browsermainwindow.h	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/demos/browser/browsermainwindow.h	2013-06-21 09:56:38.199500000 +0800
@@ -118,13 +118,15 @@
     void slotSelectLineEdit();
 
     void slotAboutToShowBackMenu();
     void slotAboutToShowForwardMenu();
     void slotAboutToShowWindowMenu();
+    void slotAboutToShowEncodingMenu();
     void slotOpenActionUrl(QAction *action);
     void slotShowWindow();
     void slotSwapFocus();
+    void slotEncodingChange();
 
     void printRequested(QWebFrame *frame);
     void geometryChangeRequested(const QRect &geometry);
     void updateToolbarActionText(bool visible);
     void updateBookmarksToolbarActionText(bool visible);
@@ -132,10 +134,14 @@
 private:
     void loadDefaultState();
     void setupMenu();
     void setupToolBar();
     void updateStatusbarActionText(bool visible);
+    QAction* menuAddEncoding(QString name, QString encoding);
+
+public:
+    QString m_currentEncoding;
 
 private:
     QToolBar *m_navigationBar;
     ToolbarSearch *m_toolbarSearch;
     BookmarksToolBar *m_bookmarksToolbar;
@@ -146,10 +152,11 @@
     QAction *m_historyBack;
     QMenu *m_historyBackMenu;
     QAction *m_historyForward;
     QMenu *m_historyForwardMenu;
     QMenu *m_windowMenu;
+    QMenu   *m_encodingMenu;
 
     QAction *m_stop;
     QAction *m_reload;
     QAction *m_stopReload;
     QAction *m_viewToolbar;
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/demos/browser/main.cpp QtWeb/src/qt/demos/browser/main.cpp
--- qt-everywhere-opensource-src-4.8.5/demos/browser/main.cpp	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/demos/browser/main.cpp	2013-06-21 14:31:34.740875000 +0800
@@ -37,15 +37,29 @@
 **
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
 
+#ifndef QT_SHARED
+    #include <QtPlugin>
+
+    Q_IMPORT_PLUGIN(qcncodecs)
+    Q_IMPORT_PLUGIN(qjpcodecs)
+    Q_IMPORT_PLUGIN(qkrcodecs)
+    Q_IMPORT_PLUGIN(qtwcodecs)
+#endif
+
 #include "browserapplication.h"
 
 int main(int argc, char **argv)
 {
     Q_INIT_RESOURCE(data);
+#ifndef QT_SHARED
+    Q_INIT_RESOURCE(WebCore);
+    Q_INIT_RESOURCE(InspectorBackendCommands);
+    Q_INIT_RESOURCE(WebKit);
+#endif
     BrowserApplication application(argc, argv);
     if (!application.isTheOnlyBrowser())
         return 0;
     application.newMainWindow();
     return application.exec();
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/demos/browser/webview.cpp QtWeb/src/qt/demos/browser/webview.cpp
--- qt-everywhere-opensource-src-4.8.5/demos/browser/webview.cpp	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/demos/browser/webview.cpp	2013-06-21 10:42:53.717875000 +0800
@@ -51,10 +51,11 @@
 #include <QtGui/QMenu>
 #include <QtGui/QMessageBox>
 #include <QtGui/QMouseEvent>
 
 #include <QtWebKit/QWebHitTestResult>
+#include <QTextCodec>
 
 #ifndef QT_NO_UITOOLS
 #include <QtUiTools/QUiLoader>
 #endif  //QT_NO_UITOOLS
 
@@ -196,18 +197,22 @@
 
 WebView::WebView(QWidget* parent)
     : QWebView(parent)
     , m_progress(0)
     , m_page(new WebPage(this))
+    , m_is_loading(false)
+    , m_encoding_in_progress(false)
 {
     setPage(m_page);
+    connect(this, SIGNAL(loadStarted()),
+            this, SLOT(loadStartedCustom()));
     connect(page(), SIGNAL(statusBarMessage(QString)),
             SLOT(setStatusBarText(QString)));
     connect(this, SIGNAL(loadProgress(int)),
             this, SLOT(setProgress(int)));
     connect(this, SIGNAL(loadFinished(bool)),
-            this, SLOT(loadFinished()));
+            this, SLOT(loadFinishedCustom(bool)));
     connect(page(), SIGNAL(loadingUrl(QUrl)),
             this, SIGNAL(urlChanged(QUrl)));
     connect(page(), SIGNAL(downloadRequested(QNetworkRequest)),
             this, SLOT(downloadRequested(QNetworkRequest)));
     page()->setForwardUnsupportedContent(true);
@@ -255,21 +260,97 @@
 void WebView::setProgress(int progress)
 {
     m_progress = progress;
 }
 
-void WebView::loadFinished()
+void WebView::applyEncoding()
 {
-    if (100 != m_progress) {
-        qWarning() << "Received finished signal while progress is still:" << progress()
-                   << "Url:" << url();
+    /*if (m_encoding_in_progress)
+        return;
+
+    if (webPage() && webPage()->mainWindow())
+    {
+        QString enc = webPage()->mainWindow()->m_currentEncoding;
+        if (enc.isEmpty())
+            return;
+
+        if (enc == m_current_encoding && m_current_encoding_url == url() )
+            return;
+
+        QWebPage *page = webPage();
+        if (!page)
+            return;
+
+        QWebFrame *mainframe = page->mainFrame();
+        if (!mainframe)
+            return;
+
+        QString html = mainframe->toHtml();
+
+        QTextCodec *codec = QTextCodec::codecForName( enc.toAscii() );
+        if (!codec)
+            return;
+
+        QTextDecoder *decoder = codec->makeDecoder();
+        if (!decoder)
+            return;
+
+        m_encoding_in_progress = true;
+        m_current_encoding = enc;
+        m_current_encoding_url = url();
+        QString output = decoder->toUnicode(html.toAscii());
+        mainframe->setHtml(output, mainframe->url());
+
+        QList<QWebFrame *> children = mainframe->childFrames();
+        foreach(QWebFrame *frame, children)
+        {
+            html = frame->toHtml();
+            output = decoder->toUnicode(html.toAscii());
+            frame->setHtml(output, frame->url());
     }
+        m_encoding_in_progress = false;
+    }*/
+}
+
+void WebView::loadStartedCustom()
+{
+    m_is_loading = true;
+}
+
+void WebView::loadFinishedCustom(bool ok)
+{
+    if (100 != m_progress) 
+        qWarning() << "Recieved finished signal while progress is still:" << progress() << "Url:" << url();
+    
+    if (ok && m_progress >= 100)
+    {
+        setStatusBarText(tr("Done"));
+
+        if (page() && page()->currentFrame())
+        {
+//            BrowserApplication::autoCompleter()->complete( page()->currentFrame());
+            applyEncoding();
+
+    
+//            BrowserApplication::instance()->mainWindow()->checkDumpAction(page());
+
+        }
+    }
+    else
+    {
+        setStatusBarText(tr("Cancelled"));
+//        BrowserApplication::instance()->mainWindow()->checkQuitAction();
+    }
+
     m_progress = 0;
+    m_is_loading = false;
 }
 
 void WebView::loadUrl(const QUrl &url)
 {
+    m_current_encoding = "";
+    m_current_encoding_url = "";
     m_initialUrl = url;
     load(url);
 }
 
 QString WebView::lastStatusBarText() const
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/demos/browser/webview.h QtWeb/src/qt/demos/browser/webview.h
--- qt-everywhere-opensource-src-4.8.5/demos/browser/webview.h	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/demos/browser/webview.h	2013-06-21 10:15:54.793250000 +0800
@@ -99,21 +99,27 @@
 protected:
     void mousePressEvent(QMouseEvent *event);
     void mouseReleaseEvent(QMouseEvent *event);
     void contextMenuEvent(QContextMenuEvent *event);
     void wheelEvent(QWheelEvent *event);
+    void applyEncoding();
 
 private slots:
+    void loadStartedCustom();
     void setProgress(int progress);
-    void loadFinished();
+    void loadFinishedCustom(bool ok);
     void setStatusBarText(const QString &string);
     void downloadRequested(const QNetworkRequest &request);
     void openLinkInNewTab();
 
 private:
     QString m_statusBarText;
     QUrl m_initialUrl;
     int m_progress;
     WebPage *m_page;
+    bool    m_is_loading;
+    bool    m_encoding_in_progress;
+    QString m_current_encoding;
+    QUrl    m_current_encoding_url;
 };
 
 #endif
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/examples/tools/codecs/codecs.pro QtWeb/src/qt/examples/tools/codecs/codecs.pro
--- qt-everywhere-opensource-src-4.8.5/examples/tools/codecs/codecs.pro	2013-06-07 08:16:42.000000000 +0800
+++ QtWeb/src/qt/examples/tools/codecs/codecs.pro	2013-06-26 19:34:13.149250000 +0800
@@ -1,10 +1,11 @@
 HEADERS      += mainwindow.h \
                 previewform.h
 SOURCES      += main.cpp \
                 mainwindow.cpp \
                 previewform.cpp
+QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs 
 
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/tools/codecs
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS encodedfiles codecs.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/tools/codecs
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/examples/tools/codecs/main.cpp QtWeb/src/qt/examples/tools/codecs/main.cpp
--- qt-everywhere-opensource-src-4.8.5/examples/tools/codecs/main.cpp	2013-06-07 08:16:42.000000000 +0800
+++ QtWeb/src/qt/examples/tools/codecs/main.cpp	2013-06-26 19:33:48.836750000 +0800
@@ -36,10 +36,19 @@
 **
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
 
+#ifndef QT_SHARED
+    #include <QtPlugin>
+
+    Q_IMPORT_PLUGIN(qcncodecs)
+    Q_IMPORT_PLUGIN(qjpcodecs)
+    Q_IMPORT_PLUGIN(qkrcodecs)
+    Q_IMPORT_PLUGIN(qtwcodecs)
+#endif
+
 #include <QApplication>
 
 #include "mainwindow.h"
 
 int main(int argc, char *argv[])
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/mkspecs/default/qmake.conf QtWeb/src/qt/mkspecs/default/qmake.conf
--- qt-everywhere-opensource-src-4.8.5/mkspecs/default/qmake.conf	2013-06-20 11:40:19.027125000 +0800
+++ QtWeb/src/qt/mkspecs/default/qmake.conf	2013-06-21 09:35:54.246375000 +0800
@@ -1,4 +1,4 @@
-QMAKESPEC_ORIGINAL=G:/qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2005
+QMAKESPEC_ORIGINAL=G:/QtWeb/src/qt/mkspecs/win32-msvc2005
 
 include(../win32-msvc2005/qmake.conf)
 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/mkspecs/qconfig.pri QtWeb/src/qt/mkspecs/qconfig.pri
--- qt-everywhere-opensource-src-4.8.5/mkspecs/qconfig.pri	2013-06-20 11:40:19.011500000 +0800
+++ QtWeb/src/qt/mkspecs/qconfig.pri	2013-06-21 09:35:54.215125000 +0800
@@ -1,9 +1,9 @@
-CONFIG+= debug shared exceptions rtti mmx 3dnow sse sse2 largefile
+CONFIG+= release static exceptions rtti mmx 3dnow sse sse2 largefile
 QT_ARCH = windows
 QT_EDITION = OpenSource
-QT_CONFIG += debug zlib no-tiff png no-mng openssl-linked ipv6 xmlpatterns native-gestures largefile svg concurrent minimal-config small-config medium-config large-config full-config shared
+QT_CONFIG += release zlib gif no-tiff jpeg png no-mng openssl-linked ipv6 xmlpatterns native-gestures largefile svg concurrent minimal-config small-config medium-config large-config full-config static
 #versioning 
 QT_VERSION = 4.8.5
 QT_MAJOR_VERSION = 4
 QT_MINOR_VERSION = 8
 QT_PATCH_VERSION = 5
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2003/qmake.conf QtWeb/src/qt/mkspecs/win32-msvc2003/qmake.conf
--- qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2003/qmake.conf	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/mkspecs/win32-msvc2003/qmake.conf	2013-06-15 14:58:09.914500000 +0800
@@ -17,13 +17,13 @@
 QMAKE_YACC              = byacc
 QMAKE_YACCFLAGS         = -d
 QMAKE_CFLAGS            = -nologo -Zm300
 QMAKE_CFLAGS_WARN_ON    = -W3
 QMAKE_CFLAGS_WARN_OFF   = -W0
-QMAKE_CFLAGS_RELEASE    = -O2 -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
-QMAKE_CFLAGS_DEBUG      = -Zi -MDd
+QMAKE_CFLAGS_RELEASE    = -O2 -MT
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
+QMAKE_CFLAGS_DEBUG      = -Zi -MTd
 QMAKE_CFLAGS_YACC       =
 
 QMAKE_CXX               = $$QMAKE_CC
 QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS
 QMAKE_CXXFLAGS_WARN_ON  = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2005/qmake.conf QtWeb/src/qt/mkspecs/win32-msvc2005/qmake.conf
--- qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2005/qmake.conf	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/mkspecs/win32-msvc2005/qmake.conf	2013-06-20 06:34:00.005125000 +0800
@@ -17,13 +17,13 @@
 QMAKE_YACC              = byacc
 QMAKE_YACCFLAGS         = -d
 QMAKE_CFLAGS            = -nologo -Zm200 -Zc:wchar_t-
 QMAKE_CFLAGS_WARN_ON    = -W3
 QMAKE_CFLAGS_WARN_OFF   = -W0
-QMAKE_CFLAGS_RELEASE    = -O2 -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
-QMAKE_CFLAGS_DEBUG      = -Zi -MDd
+QMAKE_CFLAGS_RELEASE    = -O1 -MT
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O1 -MT -Zi
+QMAKE_CFLAGS_DEBUG      = -Zi -MTd
 QMAKE_CFLAGS_YACC       =
 QMAKE_CFLAGS_LTCG       = -GL
 
 QMAKE_CXX               = $$QMAKE_CC
 QMAKE_CXXFLAGS          = $$QMAKE_CFLAGS
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2008/qmake.conf QtWeb/src/qt/mkspecs/win32-msvc2008/qmake.conf
--- qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2008/qmake.conf	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/mkspecs/win32-msvc2008/qmake.conf	2013-06-18 10:31:51.329875000 +0800
@@ -17,13 +17,13 @@
 QMAKE_YACC              = byacc
 QMAKE_YACCFLAGS         = -d
 QMAKE_CFLAGS            = -nologo -Zm200 -Zc:wchar_t-
 QMAKE_CFLAGS_WARN_ON    = -W3
 QMAKE_CFLAGS_WARN_OFF   = -W0
-QMAKE_CFLAGS_RELEASE    = -O2 -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
-QMAKE_CFLAGS_DEBUG      = -Zi -MDd
+QMAKE_CFLAGS_RELEASE    = -O1 -MT
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O1 -MT -Zi
+QMAKE_CFLAGS_DEBUG      = -Zi -MTd
 QMAKE_CFLAGS_YACC       =
 QMAKE_CFLAGS_LTCG       = -GL
 QMAKE_CFLAGS_MP         = -MP
 
 QMAKE_CXX               = $$QMAKE_CC
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2010/qmake.conf QtWeb/src/qt/mkspecs/win32-msvc2010/qmake.conf
--- qt-everywhere-opensource-src-4.8.5/mkspecs/win32-msvc2010/qmake.conf	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/mkspecs/win32-msvc2010/qmake.conf	2013-06-15 11:00:05.266750000 +0800
@@ -17,13 +17,13 @@
 QMAKE_YACC              = byacc
 QMAKE_YACCFLAGS         = -d
 QMAKE_CFLAGS            = -nologo -Zm200 -Zc:wchar_t-
 QMAKE_CFLAGS_WARN_ON    = -W3
 QMAKE_CFLAGS_WARN_OFF   = -W0
-QMAKE_CFLAGS_RELEASE    = -O2 -MD
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi
-QMAKE_CFLAGS_DEBUG      = -Zi -MDd
+QMAKE_CFLAGS_RELEASE    = -O1 -MT
+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O1 -MT -Zi
+QMAKE_CFLAGS_DEBUG      = -Zi -MTd
 QMAKE_CFLAGS_YACC       =
 QMAKE_CFLAGS_LTCG       = -GL
 QMAKE_CFLAGS_MP         = -MP
 
 QMAKE_CXX               = $$QMAKE_CC
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/WebCore.pro QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/WebCore.pro
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/WebCore.pro	2013-06-07 08:16:56.000000000 +0800
+++ QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/WebCore.pro	2013-06-15 11:27:03.141750000 +0800
@@ -14,11 +14,10 @@
 CONFIG += staticlib
 
 DESTDIR = $$WEBCORE_DESTDIR
 
 DEFINES += BUILDING_WEBKIT
-DEFINES += QT_MAKEDLL
 
 contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
     DEFINES += ENABLE_NO_LISTBOX_RENDERING=1
 }
 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/features.pri QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/features.pri
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/features.pri	2013-06-07 08:16:56.000000000 +0800
+++ QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/features.pri	2013-06-15 11:27:03.032375000 +0800
@@ -154,10 +154,13 @@
     }
 }
 
 !contains(DEFINES, ENABLE_TOUCH_EVENTS=.): DEFINES += ENABLE_TOUCH_EVENTS=1
 
+# Explicitly disable video support
+DEFINES += ENABLE_VIDEO=0
+
 # HTML5 Media Support
 # We require QtMultimedia
 !contains(DEFINES, ENABLE_VIDEO=.) {
     DEFINES -= ENABLE_VIDEO=1
     DEFINES += ENABLE_VIDEO=0
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/platform/DefaultLocalizationStrategy.cpp QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/platform/DefaultLocalizationStrategy.cpp
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/platform/DefaultLocalizationStrategy.cpp	2013-06-07 08:16:56.000000000 +0800
+++ QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/platform/DefaultLocalizationStrategy.cpp	2013-06-15 11:38:36.203250000 +0800
@@ -322,11 +322,11 @@
 #else
 #if USE(CF)
     RetainPtr<CFStringRef> selectedCFString(AdoptCF, truncatedStringForLookupMenuItem(selectedString).createCFString());
     return formatLocalizedString(WEB_UI_STRING("Look Up ??@??, "Look Up context menu item with selected word"), selectedCFString.get());
 #else
-    return WEB_UI_STRING("Look Up “<selection>”", "Look Up context menu item with selected word").replace("<selection>", truncatedStringForLookupMenuItem(selectedString));
+    return WEB_UI_STRING("Look Up \"<selection>\"", "Look Up context menu item with selected word").replace("<selection>", truncatedStringForLookupMenuItem(selectedString));
 #endif
 #endif
 }
 
 String DefaultLocalizationStrategy::contextMenuItemTagOpenLink()
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/platform/qt/KURLQt.cpp QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/platform/qt/KURLQt.cpp
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/platform/qt/KURLQt.cpp	2013-06-07 08:16:56.000000000 +0800
+++ QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/platform/qt/KURLQt.cpp	2013-06-21 21:39:24.817750000 +0800
@@ -44,10 +44,10 @@
 String KURL::fileSystemPath() const
 {
     if (!isValid() || !protocolIs("file"))
         return String();
 
-    return String(path());
+    return static_cast<QUrl>(*this).toLocalFile();
 }
 
 }
 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/platform/win/SystemTimeWin.cpp QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/platform/win/SystemTimeWin.cpp
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebCore/platform/win/SystemTimeWin.cpp	2013-06-07 08:16:56.000000000 +0800
+++ QtWeb/src/qt/src/3rdparty/webkit/Source/WebCore/platform/win/SystemTimeWin.cpp	2013-06-19 10:39:56.346625000 +0800
@@ -34,11 +34,11 @@
 
 namespace WebCore {
 
 float userIdleTime()
 {
-#if !OS(WINCE)
+#if 0
     LASTINPUTINFO lastInputInfo;
     lastInputInfo.cbSize = sizeof(LASTINPUTINFO);
     if (::GetLastInputInfo(&lastInputInfo))
         return (GetTickCount() - lastInputInfo.dwTime) * 0.001; // ::GetTickCount returns ms of uptime valid for up to 49.7 days.
 #endif
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro QtWeb/src/qt/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro	2013-06-07 08:16:58.000000000 +0800
+++ QtWeb/src/qt/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro	2013-06-15 11:27:02.876125000 +0800
@@ -1,10 +1,9 @@
 # QtWebKit - qmake build info
 CONFIG += building-libs
 CONFIG += depend_includepath
 
-TARGET = QtWebKit
 TEMPLATE = lib
 
 DEFINES += BUILDING_WEBKIT
 
 RESOURCES += \
@@ -13,37 +12,66 @@
 CONFIG(debug, debug|release) : CONFIG_DIR = debug
 else: CONFIG_DIR = release
 
 SOURCE_DIR = $$replace(PWD, /WebKit/qt, "")
 
-include($$PWD/Api/headers.pri)
 include($$SOURCE_DIR/WebKit.pri)
-include($$SOURCE_DIR/JavaScriptCore/JavaScriptCore.pri)
+
+include($$SOURCE_DIR/JavaScriptCore/JavaScriptCore.pro)
+
+for(item, SOURCES):JAVASCRIPT_CORE_SOURCES += ../../JavaScriptCore/$$item
+
+unset(SOURCES)
+
+include($$SOURCE_DIR/WebCore/WebCore.pro)
+
+for(item, SOURCES): {
+    path = $$split(item, '/')
+
+    contains(path, sqlite3.c) {
+        WEB_CORE_SOURCES += $$item
+    }
+
+    !contains(path, sqlite3.c) {
+        WEB_CORE_SOURCES += ../../WebCore/$$item
+    }
+}
+for(item, HEADERS):WEB_CORE_HEADERS += ../../WebCore/$$item
+
+mac {
+    for(item, OBJECTIVE_SOURCES):WEB_CORE_OBJECTIVE_SOURCES += ../../WebCore/$$item
+    OBJECTIVE_SOURCES = $$WEB_CORE_OBJECTIVE_SOURCES
+}
+
+SOURCES = $$JAVASCRIPT_CORE_SOURCES $$WEB_CORE_SOURCES
+HEADERS = $$WEB_CORE_HEADERS
+
+include($$PWD/Api/headers.pri)
+
 webkit2 {
     include($$SOURCE_DIR/WebKit2/WebKit2.pri)
     include($$SOURCE_DIR/WebKit2/WebKit2API.pri)
 }
-include($$SOURCE_DIR/WebCore/WebCore.pri)
 
-!v8:prependJavaScriptCoreLib(../../JavaScriptCore)
-prependWebCoreLib(../../WebCore)
-webkit2:prependWebKit2Lib(../../WebKit2)
+TARGET = QtWebKit
 
 # This is needed for syncqt when it parses the dependencies on module's main pro file so
 # the generated includes are containing the dependencies.
 # It used to be in WebCore.pro but now that this is the main pro file it has to be here.
-QT += network
+QT += network gui
 
 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..
 
 contains(QT_CONFIG, embedded):CONFIG += embedded
 
 win32*:!win32-msvc* {
     # Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
     contains(DEFINES, ENABLE_WEBGL=1)|contains(CONFIG, texmap): LIBS += $$QMAKE_LIBS_OPENGL
 }
 
+win32-msvc*:LIBS += -lAdvapi32
+
 include_webinspector: RESOURCES += $$SOURCE_DIR/WebCore/inspector/front-end/WebKit.qrc $$WC_GENERATED_SOURCES_DIR/InspectorBackendStub.qrc
 
 # Extract sources to build from the generator definitions
 defineTest(addExtraCompiler) {
     isEqual($${1}.wkAddOutputToSources, false): return(true)
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit.pro QtWeb/src/qt/src/3rdparty/webkit/Source/WebKit.pro
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit.pro	2013-06-07 08:16:54.000000000 +0800
+++ QtWeb/src/qt/src/3rdparty/webkit/Source/WebKit.pro	2013-06-15 11:27:02.829250000 +0800
@@ -1,18 +1,13 @@
 TEMPLATE = subdirs
 CONFIG += ordered
+DEFINES += Q_NODLL Q_DECL_IMPORT QT_STATIC_BUILD STATIC
 
 include(WebKit.pri)
 
-!v8 {
-    exists($$PWD/JavaScriptCore/JavaScriptCore.pro): SUBDIRS += JavaScriptCore/JavaScriptCore.pro
-    exists($$PWD/JavaScriptCore/jsc.pro): SUBDIRS += JavaScriptCore/jsc.pro
-}
-
 webkit2:exists($$PWD/WebKit2/WebKit2.pro): SUBDIRS += WebKit2/WebKit2.pro
 
-SUBDIRS += WebCore
 SUBDIRS += WebKit/qt/QtWebKit.pro
 
 webkit2 {
     exists($$PWD/WebKit2/WebProcess.pro): SUBDIRS += WebKit2/WebProcess.pro
     exists($$PWD/WebKit2/UIProcess/API/qt/tests): SUBDIRS += WebKit2/UIProcess/API/qt/tests
@@ -20,12 +15,10 @@
 
 contains(QT_CONFIG, declarative) {
     exists($$PWD/WebKit/qt/declarative): SUBDIRS += WebKit/qt/declarative
 }
 
-exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests
-
 build-qtscript {
     SUBDIRS += \
         JavaScriptCore/qt/api/QtScript.pro \
         JavaScriptCore/qt/tests \
         JavaScriptCore/qt/benchmarks
@@ -36,7 +29,5 @@
 
     # Forward the install target to WebCore. A workaround since INSTALLS is not implemented for symbian
     install.commands = $(MAKE) -C WebCore install
     QMAKE_EXTRA_TARGETS += install
 }
-
-include(WebKit/qt/docs/docs.pri)
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit2/WebProcess/win/WebProcessWin.cpp QtWeb/src/qt/src/3rdparty/webkit/Source/WebKit2/WebProcess/win/WebProcessWin.cpp
--- qt-everywhere-opensource-src-4.8.5/src/3rdparty/webkit/Source/WebKit2/WebProcess/win/WebProcessWin.cpp	2013-06-07 08:16:54.000000000 +0800
+++ QtWeb/src/qt/src/3rdparty/webkit/Source/WebKit2/WebProcess/win/WebProcessWin.cpp	2013-06-18 20:29:19.235375000 +0800
@@ -48,14 +48,14 @@
 
 namespace WebKit {
 
 static uint64_t memorySize()
 {
-    MEMORYSTATUSEX statex;
+    MEMORYSTATUS statex;
     statex.dwLength = sizeof(statex);
-    GlobalMemoryStatusEx(&statex);
-    return statex.ullTotalPhys;
+    GlobalMemoryStatus(&statex);
+    return statex.dwTotalPhys;
 }
 
 static uint64_t volumeFreeSize(CFStringRef cfstringPath)
 {
     WTF::String path(cfstringPath);
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/corelib/global/qconfig.cpp QtWeb/src/qt/src/corelib/global/qconfig.cpp
--- qt-everywhere-opensource-src-4.8.5/src/corelib/global/qconfig.cpp	2013-06-20 11:40:19.027125000 +0800
+++ QtWeb/src/qt/src/corelib/global/qconfig.cpp	2013-06-21 09:35:54.246375000 +0800
@@ -1,23 +1,23 @@
 /* Licensed */
 static const char qt_configure_licensee_str          [512 + 12] = "qt_lcnsuser=Open Source";
 static const char qt_configure_licensed_products_str [512 + 12] = "qt_lcnsprod=OpenSource";
 
 /* Build date */
-static const char qt_configure_installation          [11  + 12] = "qt_instdate=2013-06-20";
+static const char qt_configure_installation          [11  + 12] = "qt_instdate=2013-06-21";
 
-static const char qt_configure_prefix_path_str       [512 + 12] = "qt_prfxpath=G:\\qt-everywhere-opensource-src-4.8.5";
-static const char qt_configure_documentation_path_str[512 + 12] = "qt_docspath=G:\\qt-everywhere-opensource-src-4.8.5\\doc";
-static const char qt_configure_headers_path_str      [512 + 12] = "qt_hdrspath=G:\\qt-everywhere-opensource-src-4.8.5\\include";
-static const char qt_configure_libraries_path_str    [512 + 12] = "qt_libspath=G:\\qt-everywhere-opensource-src-4.8.5\\lib";
-static const char qt_configure_binaries_path_str     [512 + 12] = "qt_binspath=G:\\qt-everywhere-opensource-src-4.8.5\\bin";
-static const char qt_configure_plugins_path_str      [512 + 12] = "qt_plugpath=G:\\qt-everywhere-opensource-src-4.8.5\\plugins";
-static const char qt_configure_imports_path_str      [512 + 12] = "qt_impspath=G:\\qt-everywhere-opensource-src-4.8.5\\imports";
-static const char qt_configure_data_path_str         [512 + 12] = "qt_datapath=G:\\qt-everywhere-opensource-src-4.8.5";
-static const char qt_configure_translations_path_str [512 + 12] = "qt_trnspath=G:\\qt-everywhere-opensource-src-4.8.5\\translations";
-static const char qt_configure_examples_path_str     [512 + 12] = "qt_xmplpath=G:\\qt-everywhere-opensource-src-4.8.5\\examples";
-static const char qt_configure_demos_path_str        [512 + 12] = "qt_demopath=G:\\qt-everywhere-opensource-src-4.8.5\\demos";
+static const char qt_configure_prefix_path_str       [512 + 12] = "qt_prfxpath=G:\\QtWeb\\src\\qt";
+static const char qt_configure_documentation_path_str[512 + 12] = "qt_docspath=G:\\QtWeb\\src\\qt\\doc";
+static const char qt_configure_headers_path_str      [512 + 12] = "qt_hdrspath=G:\\QtWeb\\src\\qt\\include";
+static const char qt_configure_libraries_path_str    [512 + 12] = "qt_libspath=G:\\QtWeb\\src\\qt\\lib";
+static const char qt_configure_binaries_path_str     [512 + 12] = "qt_binspath=G:\\QtWeb\\src\\qt\\bin";
+static const char qt_configure_plugins_path_str      [512 + 12] = "qt_plugpath=G:\\QtWeb\\src\\qt\\plugins";
+static const char qt_configure_imports_path_str      [512 + 12] = "qt_impspath=G:\\QtWeb\\src\\qt\\imports";
+static const char qt_configure_data_path_str         [512 + 12] = "qt_datapath=G:\\QtWeb\\src\\qt";
+static const char qt_configure_translations_path_str [512 + 12] = "qt_trnspath=G:\\QtWeb\\src\\qt\\translations";
+static const char qt_configure_examples_path_str     [512 + 12] = "qt_xmplpath=G:\\QtWeb\\src\\qt\\examples";
+static const char qt_configure_demos_path_str        [512 + 12] = "qt_demopath=G:\\QtWeb\\src\\qt\\demos";
 /* strlen( "qt_lcnsxxxx") == 12 */
 #define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12;
 #define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12;
 #define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12;
 #define QT_CONFIGURE_DOCUMENTATION_PATH qt_configure_documentation_path_str + 12;
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/corelib/global/qconfig.h QtWeb/src/qt/src/corelib/global/qconfig.h
--- qt-everywhere-opensource-src-4.8.5/src/corelib/global/qconfig.h	2013-06-20 11:40:19.011500000 +0800
+++ QtWeb/src/qt/src/corelib/global/qconfig.h	2013-06-21 09:35:54.230750000 +0800
@@ -1,10 +1,7 @@
 /* Everything */
 
-#ifndef QT_DLL
-#define QT_DLL
-#endif
 
 /* License information */
 #define QT_PRODUCT_LICENSEE "Open Source"
 #define QT_PRODUCT_LICENSE "OpenSource"
 
@@ -37,10 +34,16 @@
 #define Q_BYTE_ORDER Q_LITTLE_ENDIAN
 
 // Compile time features
 #define QT_ARCH_WINDOWS
 #define QT_LARGEFILE_SUPPORT 64
+#if defined(QT_BUILTIN_GIF_READER) && defined(QT_NO_BUILTIN_GIF_READER)
+# undef QT_BUILTIN_GIF_READER
+#elif !defined(QT_BUILTIN_GIF_READER)
+# define QT_BUILTIN_GIF_READER 1
+#endif
+
 #if defined(QT_GRAPHICSSYSTEM_RASTER) && defined(QT_NO_GRAPHICSSYSTEM_RASTER)
 # undef QT_GRAPHICSSYSTEM_RASTER
 #elif !defined(QT_GRAPHICSSYSTEM_RASTER)
 # define QT_GRAPHICSSYSTEM_RASTER
 #endif
@@ -79,16 +82,10 @@
 # undef QT_NO_FREETYPE
 #elif !defined(QT_NO_FREETYPE)
 # define QT_NO_FREETYPE
 #endif
 
-#if defined(QT_NO_IMAGEFORMAT_JPEG) && defined(QT_IMAGEFORMAT_JPEG)
-# undef QT_NO_IMAGEFORMAT_JPEG
-#elif !defined(QT_NO_IMAGEFORMAT_JPEG)
-# define QT_NO_IMAGEFORMAT_JPEG
-#endif
-
 #if defined(QT_NO_IMAGEFORMAT_MNG) && defined(QT_IMAGEFORMAT_MNG)
 # undef QT_NO_IMAGEFORMAT_MNG
 #elif !defined(QT_NO_IMAGEFORMAT_MNG)
 # define QT_NO_IMAGEFORMAT_MNG
 #endif
@@ -187,6 +184,12 @@
 # undef QT_NO_STYLE_WINDOWSMOBILE
 #elif !defined(QT_NO_STYLE_WINDOWSMOBILE)
 # define QT_NO_STYLE_WINDOWSMOBILE
 #endif
 
+#if defined(QT_SQL_SQLITE) && defined(QT_NO_SQL_SQLITE)
+# undef QT_SQL_SQLITE
+#elif !defined(QT_SQL_SQLITE)
+# define QT_SQL_SQLITE
+#endif
+
 #define QT_NO_INOTIFY
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfsfileengine_win.cpp QtWeb/src/qt/src/corelib/io/qfsfileengine_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/corelib/io/qfsfileengine_win.cpp	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/src/corelib/io/qfsfileengine_win.cpp	2013-06-18 20:58:21.433250000 +0800
@@ -269,11 +269,11 @@
 
     // Windows native mode.
     if (fileHandle == INVALID_HANDLE_VALUE)
         return 0;
 
-#if !defined(Q_OS_WINCE)
+#if 0
     LARGE_INTEGER currentFilePos;
     LARGE_INTEGER offset;
     offset.QuadPart = 0;
     if (!::SetFilePointerEx(fileHandle, offset, &currentFilePos, FILE_CURRENT)) {
         thatQ->setError(QFile::UnspecifiedError, qt_error_string());
@@ -305,11 +305,11 @@
     if (fh || fd != -1) {
         // stdlib / stdio mode.
         return seekFdFh(pos);
     }
 
-#if !defined(Q_OS_WINCE)
+#if 0
     LARGE_INTEGER currentFilePos;
     LARGE_INTEGER offset;
     offset.QuadPart = pos;
     if (!::SetFilePointerEx(fileHandle, offset, &currentFilePos, FILE_BEGIN)) {
         q->setError(QFile::UnspecifiedError, qt_error_string());
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/corelib/kernel/qeventdispatcher_win.cpp QtWeb/src/qt/src/corelib/kernel/qeventdispatcher_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/corelib/kernel/qeventdispatcher_win.cpp	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/src/corelib/kernel/qeventdispatcher_win.cpp	2013-06-26 20:58:22.064500000 +0800
@@ -810,11 +810,11 @@
 
                 if (!filterEvent(&msg)) {
                     TranslateMessage(&msg);
                     DispatchMessage(&msg);
                 }
-            } else if (waitRet < WAIT_OBJECT_0 + nCount) {
+            } else if (waitRet >= WAIT_OBJECT_0 && waitRet < WAIT_OBJECT_0 + nCount) {
                 d->activateEventNotifier(d->winEventNotifierList.at(waitRet - WAIT_OBJECT_0));
             } else {
                 // nothing todo so break
                 break;
             }
@@ -830,13 +830,13 @@
             Q_ASSERT(nCount < MAXIMUM_WAIT_OBJECTS - 1);
             for (int i=0; i<(int)nCount; i++)
                 pHandles[i] = d->winEventNotifierList.at(i)->handle();
 
             emit aboutToBlock();
-            waitRet = MsgWaitForMultipleObjectsEx(nCount, pHandles, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE | MWMO_INPUTAVAILABLE);
+            waitRet = MsgWaitForMultipleObjectsEx(nCount, pHandles, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE);
             emit awake();
-            if (waitRet < WAIT_OBJECT_0 + nCount) {
+            if (waitRet >= WAIT_OBJECT_0 && waitRet < WAIT_OBJECT_0 + nCount) {
                 d->activateEventNotifier(d->winEventNotifierList.at(waitRet - WAIT_OBJECT_0));
                 retVal = true;
             }
         }
     } while (canWait);
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/corelib/tools/qlocale_win.cpp QtWeb/src/qt/src/corelib/tools/qlocale_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/corelib/tools/qlocale_win.cpp	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/src/corelib/tools/qlocale_win.cpp	2013-06-18 19:58:31.188500000 +0800
@@ -562,11 +562,12 @@
             return result;
         }
     }
 
     // old Windows before Vista
-    return QStringList(QString::fromLatin1(winLangCodeToIsoName(GetUserDefaultUILanguage())));
+//    return QStringList(QString::fromLatin1(winLangCodeToIsoName(GetUserDefaultUILanguage())));
+    return QStringList(QString::fromLatin1(winLangCodeToIsoName(GetUserDefaultLangID())));
 }
 
 QVariant QSystemLocalePrivate::nativeLanguageName()
 {
     if (QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS7)
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/corelib/tools/qsimd.cpp QtWeb/src/qt/src/corelib/tools/qsimd.cpp
--- qt-everywhere-opensource-src-4.8.5/src/corelib/tools/qsimd.cpp	2013-06-07 08:16:52.000000000 +0800
+++ QtWeb/src/qt/src/corelib/tools/qsimd.cpp	2013-06-15 11:07:26.063625000 +0800
@@ -192,10 +192,12 @@
             : "%ecx"
             );
     }
 
 #elif defined (Q_OS_WIN)
+#undef xor
+#define xor xor
     _asm {
         push eax
         push ebx
         push ecx
         push edx
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/dialogs/qfiledialog.cpp QtWeb/src/qt/src/gui/dialogs/qfiledialog.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/dialogs/qfiledialog.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/dialogs/qfiledialog.cpp	2013-06-19 15:45:12.455375000 +0800
@@ -1788,10 +1788,14 @@
     args.selection = QFileDialogPrivate::initialSelection(dir);
     args.filter = filter;
     args.mode = ExistingFile;
     args.options = options;
 #if defined(Q_WS_WIN)
+    if(qt_use_native_dialogs && QSysInfo::WindowsVersion == QSysInfo::WV_NT) {
+        qt_use_native_dialogs = false; // Workaround for NT
+    }
+
     if (qt_use_native_dialogs && !(args.options & DontUseNativeDialog)) {
         return qt_win_get_open_file_name(args, &(args.directory), selectedFilter);
     }
 #endif
 
@@ -1881,10 +1885,13 @@
     args.filter = filter;
     args.mode = ExistingFiles;
     args.options = options;
 
 #if defined(Q_WS_WIN)
+    if(qt_use_native_dialogs && QSysInfo::WindowsVersion == QSysInfo::WV_NT) {
+        qt_use_native_dialogs = false; // Workaround for NT
+    }
     if (qt_use_native_dialogs && !(args.options & DontUseNativeDialog)) {
         return qt_win_get_open_file_names(args, &(args.directory), selectedFilter);
     }
 #endif
 
@@ -1975,10 +1982,14 @@
     args.filter = filter;
     args.mode = AnyFile;
     args.options = options;
 
 #if defined(Q_WS_WIN)
+    if(qt_use_native_dialogs && QSysInfo::WindowsVersion == QSysInfo::WV_NT) {
+        qt_use_native_dialogs = false; // Workaround for NT
+    }
+
     if (qt_use_native_dialogs && !(args.options & DontUseNativeDialog)) {
         return qt_win_get_save_file_name(args, &(args.directory), selectedFilter);
     }
 #endif
 
@@ -2055,10 +2066,14 @@
     args.directory = QFileDialogPrivate::workingDirectory(dir);
     args.mode = (options & ShowDirsOnly ? DirectoryOnly : Directory);
     args.options = options;
 
 #if defined(Q_WS_WIN)
+    if(qt_use_native_dialogs && QSysInfo::WindowsVersion == QSysInfo::WV_NT) {
+        qt_use_native_dialogs = false; // Workaround for NT
+    }
+
     if (qt_use_native_dialogs && !(args.options & DontUseNativeDialog) && (options & ShowDirsOnly)
 #if defined(Q_WS_WINCE)
         && qt_priv_ptr_valid
 #endif
         ) {
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/dialogs/qfilesystemmodel.cpp QtWeb/src/qt/src/gui/dialogs/qfilesystemmodel.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/dialogs/qfilesystemmodel.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/dialogs/qfilesystemmodel.cpp	2013-06-18 20:45:42.167625000 +0800
@@ -53,10 +53,16 @@
 #endif
 #ifdef Q_OS_WIN32
 #include <QtCore/QVarLengthArray>
 #endif
 
+#ifdef Q_OS_WIN32
+static HMODULE  hkernel32;
+typedef DWORD (WINAPI * pGetLongPathNameW)(LPCTSTR, LPTSTR, DWORD);
+static pGetLongPathNameW pGLPNW;
+#endif
+
 QT_BEGIN_NAMESPACE
 
 #ifndef QT_NO_FILESYSTEMMODEL
 
 /*!
@@ -305,10 +311,13 @@
 }
 
 #ifdef Q_OS_WIN32
 static QString qt_GetLongPathName(const QString &strShortPath)
 {
+    hkernel32 = GetModuleHandleA("kernel32.dll");
+    pGLPNW = (pGetLongPathNameW) GetProcAddress(hkernel32, "GetLongPathNameW"); 
+
     if (strShortPath.isEmpty()
         || strShortPath == QLatin1String(".") || strShortPath == QLatin1String(".."))
         return strShortPath;
     if (strShortPath.length() == 2 && strShortPath.endsWith(QLatin1Char(':')))
         return strShortPath.toUpper();
@@ -318,16 +327,16 @@
         return QDir::fromNativeSeparators(absPath);
     if (absPath.startsWith(QLatin1Char('/')))
         return QString();
     const QString inputString = QLatin1String("\\\\?\\") + QDir::toNativeSeparators(absPath);
     QVarLengthArray<TCHAR, MAX_PATH> buffer(MAX_PATH);
-    DWORD result = ::GetLongPathName((wchar_t*)inputString.utf16(),
+    DWORD result = pGLPNW ? pGLPNW((wchar_t*)inputString.utf16(),
                                      buffer.data(),
-                                     buffer.size());
+                                     buffer.size()) : 0;
     if (result > DWORD(buffer.size())) {
         buffer.resize(result);
-        result = ::GetLongPathName((wchar_t*)inputString.utf16(),
+        result = pGLPNW((wchar_t*)inputString.utf16(),
                                    buffer.data(),
                                    buffer.size());
     }
     if (result > 4) {
         QString longPath = QString::fromWCharArray(buffer.data() + 4); // ignoring prefix
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/dialogs/qprintdialog_win.cpp QtWeb/src/qt/src/gui/dialogs/qprintdialog_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/dialogs/qprintdialog_win.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/dialogs/qprintdialog_win.cpp	2013-06-18 20:17:54.907250000 +0800
@@ -57,10 +57,14 @@
 #define PD_RESULT_PRINT	1
 #define PD_RESULT_APPLY	2
 #define START_PAGE_GENERAL  0XFFFFFFFF
 #endif
 
+static HMODULE  hcomdlg32;
+typedef HRESULT (WINAPI * pPrintDlgExW)(LPPRINTDLGEXW);
+static pPrintDlgExW pPDExW;
+
 QT_BEGIN_NAMESPACE
 
 extern void qt_win_eatMouseMove();
 
 class QPrintDialogPrivate : public QAbstractPrintDialogPrivate
@@ -227,10 +231,13 @@
 
     // If there is no window, fall back to the print dialog itself
     if (parent == 0)
         parent = q;
 
+    hcomdlg32 = GetModuleHandleA("comdlg32.dll");
+    pPDExW = (pPrintDlgExW) GetProcAddress(hcomdlg32, "PrintDlgExW"); 
+
     QWidget modal_widget;
     modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
     modal_widget.setParent(parent, Qt::Window);
     QApplicationPrivate::enterModal(&modal_widget);
 
@@ -248,11 +255,11 @@
     qt_win_setup_PRINTDLGEX(&pd, parent, q, this, tempDevNames);
 
     do {
         done = true;
         doPrinting = false;
-        result = (PrintDlgEx(&pd) == S_OK);
+        result = (pPDExW && pPDExW(&pd) == S_OK);
         if (result && (pd.dwResultAction == PD_RESULT_PRINT
                        || pd.dwResultAction == PD_RESULT_APPLY))
         {
             doPrinting = (pd.dwResultAction == PD_RESULT_PRINT);
             if ((pd.Flags & PD_PAGENUMS)
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/inputmethod/qwininputcontext_win.cpp QtWeb/src/qt/src/gui/inputmethod/qwininputcontext_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/inputmethod/qwininputcontext_win.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/inputmethod/qwininputcontext_win.cpp	2013-06-18 20:00:36.016625000 +0800
@@ -213,11 +213,11 @@
 static DWORD WM_MSIME_MOUSE = 0;
 
 QWinInputContext::QWinInputContext(QObject *parent)
     : QInputContext(parent), recursionGuard(false)
 {
-#ifndef Q_WS_WINCE
+#if 0
     QSysInfo::WinVersion ver = QSysInfo::windowsVersion();
     if (ver & QSysInfo::WV_NT_based  && ver >= QSysInfo::WV_VISTA) {
         // Since the IsValidLanguageGroup/IsValidLocale functions always return true on 
         // Vista, check the Keyboard Layouts for enabling RTL. 
         UINT nLayouts = GetKeyboardLayoutList(0, 0);
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_win.cpp QtWeb/src/qt/src/gui/kernel/qapplication_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qapplication_win.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/kernel/qapplication_win.cpp	2013-06-18 18:30:09.808750000 +0800
@@ -1345,11 +1345,11 @@
     MessageBeep(MB_OK);
 }
 
 static void alert_widget(QWidget *widget, int duration)
 {
-#ifdef Q_OS_WINCE
+#if 1
     Q_UNUSED(widget);
     Q_UNUSED(duration);
 #else
     bool stopFlash = duration < 0;
 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qcursor_win.cpp QtWeb/src/qt/src/gui/kernel/qcursor_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qcursor_win.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/kernel/qcursor_win.cpp	2013-06-19 14:00:19.067000000 +0800
@@ -292,10 +292,18 @@
         0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
 
+   static const uchar pointhand_bits[] = {
+        0x60,0x00,0x90,0x00,0x90,0x00,0x90,0x00,0x90,0x0f,0x90,0x34,
+        0x96,0x54,0x19,0x40,0x11,0x40,0x82,0x4a,0x84,0x4a,0x84,0x2a,
+        0x88,0x2a,0x10,0x10,0x20,0x14,0xe0,0x1b};
+   static const uchar pointhandm_bits[] = {
+        0x60,0x00,0xf0,0x00,0xf0,0x00,0xf0,0x00,0xf0,0x0f,0xf0,0x3f,
+        0xf6,0x7f,0xff,0x7f,0xff,0x7f,0xfe,0x7f,0xfc,0x7f,0xfc,0x3f,
+        0xf8,0x3f,0xf0,0x1f,0xe0,0x1f,0xe0,0x1b};
    static const uchar openhand_bits[] = {
         0x80,0x01,0x58,0x0e,0x64,0x12,0x64,0x52,0x48,0xb2,0x48,0x92,
         0x16,0x90,0x19,0x80,0x11,0x40,0x02,0x40,0x04,0x40,0x04,0x20,
         0x08,0x20,0x10,0x10,0x20,0x10,0x00,0x00};
     static const uchar openhandm_bits[] = {
@@ -356,12 +364,10 @@
         break;
     case Qt::BusyCursor:
         sh = IDC_APPSTARTING;
         break;
     case Qt::PointingHandCursor:
-        sh = IDC_HAND;
-        break;
     case Qt::BlankCursor:
     case Qt::SplitVCursor:
     case Qt::SplitHCursor:
     case Qt::OpenHandCursor:
     case Qt::ClosedHandCursor:
@@ -372,10 +378,23 @@
             bbits = QImage(32, 32, QImage::Format_Mono);
             bbits.fill(0);                // ignore color table
             mbits = bbits.copy();
             hx = hy = 16;
             invb = invm = false;
+        } else if (cshape == Qt::PointingHandCursor) {
+            if(QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
+                sh = IDC_HAND;
+                break;
+            } else {
+                QBitmap cb = QBitmap::fromData(QSize(16, 16), pointhand_bits);
+                QBitmap cm = QBitmap::fromData(QSize(16, 16), pointhandm_bits);
+                bbits = cb.toImage().convertToFormat(QImage::Format_Mono);
+                mbits = cm.toImage().convertToFormat(QImage::Format_Mono);
+                hx = 5;
+                hy = 0;
+                invb = invm = false;
+            }
         } else if (cshape == Qt::OpenHandCursor || cshape == Qt::ClosedHandCursor) {
             bool open = cshape == Qt::OpenHandCursor;
             QBitmap cb = QBitmap::fromData(QSize(16, 16), open ? openhand_bits : closedhand_bits);
             QBitmap cm = QBitmap::fromData(QSize(16, 16), open ? openhandm_bits : closedhandm_bits);
             bbits = cb.toImage().convertToFormat(QImage::Format_Mono);
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qdesktopwidget_win.cpp QtWeb/src/qt/src/gui/kernel/qdesktopwidget_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qdesktopwidget_win.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/kernel/qdesktopwidget_win.cpp	2013-06-19 14:23:27.252250000 +0800
@@ -153,10 +153,11 @@
     rects = new QVector<QRect>();
     workrects = new QVector<QRect>();
     screenCount = 0;
 
 #ifndef Q_OS_WINCE
+    if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
     QSystemLibrary user32Lib(QLatin1String("user32"));
     enumDisplayMonitors = (EnumFunc)user32Lib.resolve("EnumDisplayMonitors");
     getMonitorInfo = (InfoFunc)user32Lib.resolve("GetMonitorInfoW");
 
     if (!enumDisplayMonitors || !getMonitorInfo) {
@@ -168,10 +169,16 @@
     }
     // Calls enumCallback
     enumDisplayMonitors(0, 0, enumCallback, 0);
     enumDisplayMonitors = 0;
     getMonitorInfo = 0;
+    } else {
+        rects->resize(1);
+        rects->replace(0, that->rect());
+        workrects->resize(1);
+        workrects->replace(0, that->rect());
+    }
 #else
     QSystemLibrary coreLib(QLatin1String("coredll"));
     // CE >= 4.0 case
     enumDisplayMonitors = (EnumFunc)coreLib.resolve("EnumDisplayMonitors");
     getMonitorInfo = (InfoFunc)coreLib.resolve("GetMonitorInfo");
@@ -287,28 +294,37 @@
     Q_D(const QDesktopWidget);
 #ifdef Q_WS_WINCE_WM
     for(int i=0; i < d->workrects->size(); ++i)
         qt_get_sip_info((*d->workrects)[i]);
 #endif
+    if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
     if (screen < 0 || screen >= d->screenCount)
         screen = d->primaryScreen;
 
     return d->workrects->at(screen);
+    } else {
+        return d->workrects->at(d->primaryScreen);
+    }
 }
 
 const QRect QDesktopWidget::screenGeometry(int screen) const
 {
     const QDesktopWidgetPrivate *d = d_func();
+    if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
     if (screen < 0 || screen >= d->screenCount)
         screen = d->primaryScreen;
 
     return d->rects->at(screen);
+    } else {
+        return d->rects->at(d->primaryScreen);
+    }
 }
 
 int QDesktopWidget::screenNumber(const QWidget *widget) const
 {
     Q_D(const QDesktopWidget);
+    if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
     if (!widget)
         return d->primaryScreen;
 
     QRect frame = widget->frameGeometry();
     if (!widget->isWindow())
@@ -325,26 +341,31 @@
             maxScreen = i;
         }
     }
 
     return maxScreen;
+    } else {
+        return d->primaryScreen;
+    }
 }
 
 int QDesktopWidget::screenNumber(const QPoint &point) const
 {
     Q_D(const QDesktopWidget);
 
     int closestScreen = -1;
     int shortestDistance = INT_MAX;
 
+    if (QSysInfo::WindowsVersion != QSysInfo::WV_95 && QSysInfo::WindowsVersion != QSysInfo::WV_NT) {
     for (int i = 0; i < d->screenCount; ++i) {
         int thisDistance = d->pointToRect(point, d->rects->at(i));
         if (thisDistance < shortestDistance) {
             shortestDistance = thisDistance;
             closestScreen = i;
         }
     }
+    }
 
     return closestScreen;
 }
 
 void QDesktopWidget::resizeEvent(QResizeEvent *)
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qwidget.cpp QtWeb/src/qt/src/gui/kernel/qwidget.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qwidget.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/kernel/qwidget.cpp	2013-06-15 11:27:02.969875000 +0800
@@ -11098,10 +11098,11 @@
   \sa setAttribute()
  */
 bool QWidget::testAttribute_helper(Qt::WidgetAttribute attribute) const
 {
     Q_D(const QWidget);
+    if (!d) return false;
     const int x = attribute - 8*sizeof(uint);
     const int int_off = x / (8*sizeof(uint));
     return (d->high_attributes[int_off] & (1<<(x-(int_off*8*sizeof(uint)))));
 }
 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qwidget_win.cpp QtWeb/src/qt/src/gui/kernel/qwidget_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/kernel/qwidget_win.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/kernel/qwidget_win.cpp	2013-06-19 13:58:56.785750000 +0800
@@ -293,12 +293,15 @@
         sh = GetSystemMetrics(SM_CYSCREEN);
     }
 
     if (desktop && !q->testAttribute(Qt::WA_DontShowOnScreen)) {                                // desktop widget
         popup = false;                                // force this flags off
+        if (QSysInfo::WindowsVersion != QSysInfo::WV_NT && QSysInfo::WindowsVersion != QSysInfo::WV_95)
         data.crect.setRect(GetSystemMetrics(76 /* SM_XVIRTUALSCREEN  */), GetSystemMetrics(77 /* SM_YVIRTUALSCREEN  */),
                            GetSystemMetrics(78 /* SM_CXVIRTUALSCREEN */), GetSystemMetrics(79 /* SM_CYVIRTUALSCREEN */));
+        else
+            data.crect.setRect(0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
     }
 
     parentw = q->parentWidget() ? q->parentWidget()->effectiveWinId() : 0;
 
     QString title;
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/styles/qstyle.qrc QtWeb/src/qt/src/gui/styles/qstyle.qrc
--- qt-everywhere-opensource-src-4.8.5/src/gui/styles/qstyle.qrc	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/styles/qstyle.qrc	2013-06-15 11:27:02.923000000 +0800
@@ -1,107 +1,75 @@
 <!DOCTYPE RCC><RCC version="1.0">
 <qresource prefix="/trolltech/styles/commonstyle">
 <file>images/filelink-16.png</file>
 <file>images/filelink-32.png</file>
-<file>images/filelink-128.png</file>
 <file>images/file-16.png</file>
 <file>images/file-32.png</file>
-<file>images/file-128.png</file>
 <file>images/newdirectory-16.png</file>
 <file>images/newdirectory-32.png</file>
-<file>images/newdirectory-128.png</file>
 <file>images/parentdir-16.png</file>
 <file>images/parentdir-32.png</file>
-<file>images/parentdir-128.png</file>
 <file>images/dvd-16.png</file>
 <file>images/dvd-32.png</file>
-<file>images/dvd-128.png</file>
 <file>images/cdr-16.png</file>
 <file>images/cdr-32.png</file>
-<file>images/cdr-128.png</file>
 <file>images/floppy-16.png</file>
 <file>images/floppy-32.png</file>
-<file>images/floppy-128.png</file>
 <file>images/harddrive-16.png</file>
 <file>images/harddrive-32.png</file>
-<file>images/harddrive-128.png</file>
 <file>images/trash-16.png</file>
 <file>images/trash-32.png</file>
-<file>images/trash-128.png</file>
 <file>images/networkdrive-16.png</file>
 <file>images/networkdrive-32.png</file>
-<file>images/networkdrive-128.png</file>
 <file>images/computer-16.png</file>
 <file>images/computer-32.png</file>
 <file>images/desktop-16.png</file>
 <file>images/desktop-32.png</file>
 <file>images/dirclosed-16.png</file>
 <file>images/dirclosed-32.png</file>
-<file>images/dirclosed-128.png</file>
 <file>images/dirlink-16.png</file>
 <file>images/dirlink-32.png</file>
-<file>images/dirlink-128.png</file>
 <file>images/diropen-16.png</file>
 <file>images/diropen-32.png</file>
-<file>images/diropen-128.png</file>
 <file>images/left-16.png</file>
 <file>images/left-32.png</file>
-<file>images/left-128.png</file>
 <file>images/right-16.png</file>
 <file>images/right-32.png</file>
-<file>images/right-128.png</file>
 <file>images/up-16.png</file>
 <file>images/up-32.png</file>
-<file>images/up-128.png</file>
 <file>images/down-16.png</file>
 <file>images/down-32.png</file>
-<file>images/down-128.png</file>
 <file>images/filecontents-16.png</file>
 <file>images/filecontents-32.png</file>
-<file>images/filecontents-128.png</file>
 <file>images/fileinfo-16.png</file>
 <file>images/fileinfo-32.png</file>
-<file>images/fileinfo-128.png</file>
 <file>images/viewdetailed-16.png</file>
 <file>images/viewdetailed-32.png</file>
-<file>images/viewdetailed-128.png</file>
 <file>images/viewlist-16.png</file>
 <file>images/viewlist-32.png</file>
-<file>images/viewlist-128.png</file>
 <file>images/fontbitmap-16.png</file>
 <file>images/fonttruetype-16.png</file>
-<file>images/standardbutton-apply-128.png</file>
 <file>images/standardbutton-apply-16.png</file>
 <file>images/standardbutton-apply-32.png</file>
-<file>images/standardbutton-cancel-128.png</file>
 <file>images/standardbutton-cancel-16.png</file>
 <file>images/standardbutton-cancel-32.png</file>
-<file>images/standardbutton-clear-128.png</file>
 <file>images/standardbutton-clear-16.png</file>
 <file>images/standardbutton-clear-32.png</file>
-<file>images/standardbutton-close-128.png</file>
 <file>images/standardbutton-close-16.png</file>
 <file>images/standardbutton-close-32.png</file>
-<file>images/standardbutton-delete-128.png</file>
 <file>images/standardbutton-delete-16.png</file>
 <file>images/standardbutton-delete-32.png</file>
-<file>images/standardbutton-help-128.png</file>
 <file>images/standardbutton-help-16.png</file>
 <file>images/standardbutton-help-32.png</file>
-<file>images/standardbutton-no-128.png</file>
 <file>images/standardbutton-no-16.png</file>
 <file>images/standardbutton-no-32.png</file>
-<file>images/standardbutton-ok-128.png</file>
 <file>images/standardbutton-ok-16.png</file>
 <file>images/standardbutton-ok-32.png</file>
-<file>images/standardbutton-open-128.png</file>
 <file>images/standardbutton-open-16.png</file>
 <file>images/standardbutton-open-32.png</file>
-<file>images/standardbutton-save-128.png</file>
 <file>images/standardbutton-save-16.png</file>
 <file>images/standardbutton-save-32.png</file>
-<file>images/standardbutton-yes-128.png</file>
 <file>images/standardbutton-yes-16.png</file>
 <file>images/standardbutton-yes-32.png</file>
 <file>images/standardbutton-closetab-16.png</file>
 <file>images/standardbutton-closetab-down-16.png</file>
 <file>images/standardbutton-closetab-hover-16.png</file>
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/styles/qstylefactory.cpp QtWeb/src/qt/src/gui/styles/qstylefactory.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/styles/qstylefactory.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/styles/qstylefactory.cpp	2013-06-15 11:27:03.188625000 +0800
@@ -67,10 +67,13 @@
 #include "qwindowscestyle.h"
 #endif
 #ifndef QT_NO_STYLE_WINDOWSMOBILE
 #include "qwindowsmobilestyle.h"
 #endif
+#ifndef QT_NO_STYLE_QTDOTNET
+#include "qtdotnetstyle.h"
+#endif
 #ifndef QT_NO_STYLE_S60
 #include "qs60style.h"
 #endif
 
 QT_BEGIN_NAMESPACE
@@ -145,10 +148,15 @@
 #ifndef QT_NO_STYLE_WINDOWSVISTA
     if (style == QLatin1String("windowsvista"))
         ret = new QWindowsVistaStyle;
     else
 #endif
+#ifndef QT_NO_STYLE_QTDOTNET
+    if (style == QLatin1String("windows .net"))
+        ret = new QtDotNetStyle;
+    else
+#endif
 #ifndef QT_NO_STYLE_MOTIF
     if (style == QLatin1String("motif"))
         ret = new QMotifStyle;
     else
 #endif
@@ -231,10 +239,15 @@
 #ifndef QT_NO_STYLE_WINDOWSVISTA
     if (!list.contains(QLatin1String("WindowsVista")) &&
         (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based)))
         list << QLatin1String("WindowsVista");
 #endif
+#ifndef QT_NO_STYLE_QTDOTNET
+    if (!list.contains(QLatin1String("Windows .NET")) &&
+        (QSysInfo::WindowsVersion >= QSysInfo::WV_2000 && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based))
+        list << QLatin1String("Windows .NET");
+#endif
 #ifndef QT_NO_STYLE_MOTIF
     if (!list.contains(QLatin1String("Motif")))
         list << QLatin1String("Motif");
 #endif
 #ifndef QT_NO_STYLE_CDE
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/styles/styles.pri QtWeb/src/qt/src/gui/styles/styles.pri
--- qt-everywhere-opensource-src-4.8.5/src/gui/styles/styles.pri	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/styles/styles.pri	2013-06-15 11:27:03.188625000 +0800
@@ -182,5 +182,8 @@
         HEADERS += styles/qs60style.h
         SOURCES += styles/qs60style_stub.cpp
     }
     DEFINES += QT_NO_STYLE_S60
 }
+
+HEADERS += styles/qtdotnetstyle.h
+SOURCES += styles/qtdotnetstyle.cpp
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/text/qfontengine_win.cpp QtWeb/src/qt/src/gui/text/qfontengine_win.cpp
--- qt-everywhere-opensource-src-4.8.5/src/gui/text/qfontengine_win.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/text/qfontengine_win.cpp	2013-06-19 11:30:42.627875000 +0800
@@ -398,10 +398,23 @@
 #if defined(Q_WS_WINCE)
     GetCharWidth32(hdc, glyph, glyph, &width);
 #else
     if (ptrGetCharWidthI)
         ptrGetCharWidthI(hdc, glyph, 1, 0, &width);
+    else {
+        GLYPHMETRICS gm;
+        DWORD res = GDI_ERROR;
+        MAT2 mat;
+        mat.eM11.value = mat.eM22.value = 1;
+        mat.eM11.fract = mat.eM22.fract = 0;
+        mat.eM21.value = mat.eM12.value = 0;
+        mat.eM21.fract = mat.eM12.fract = 0;
+        res = GetGlyphOutline(hdc, glyph, GGO_METRICS|GGO_GLYPH_INDEX|GGO_NATIVE, &gm, 0, 0, &mat);
+        if (res != GDI_ERROR) {
+            width = gm.gmCellIncX;
+        }
+    }
 #endif
 }
 
 void QFontEngineWin::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const
 {
@@ -651,11 +664,11 @@
         0
 };
 
 static const int char_table_entries = sizeof(char_table)/sizeof(ushort);
 
-#ifndef Q_CC_MINGW
+#if 0
 void QFontEngineWin::getGlyphBearings(glyph_t glyph, qreal *leftBearing, qreal *rightBearing)
 {
     HDC hdc = shared_dc();
     SelectObject(hdc, hfont);
 
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/gui/text/qfontengine_win_p.h QtWeb/src/qt/src/gui/text/qfontengine_win_p.h
--- qt-everywhere-opensource-src-4.8.5/src/gui/text/qfontengine_win_p.h	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/gui/text/qfontengine_win_p.h	2013-06-18 18:25:51.918125000 +0800
@@ -106,11 +106,11 @@
     virtual QImage alphaMapForGlyph(glyph_t, const QTransform &xform);
     virtual QImage alphaRGBMapForGlyph(glyph_t t, QFixed subPixelPosition, int margin, const QTransform &xform);
 
     virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
 
-#ifndef Q_CC_MINGW
+#if 0
     virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0);
 #endif
 
     int getGlyphIndexes(const QChar *ch, int numChars, QGlyphLayout *glyphs, bool mirrored) const;
     void getCMap();
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/plugins/codecs/jp/qeucjpcodec.cpp QtWeb/src/qt/src/plugins/codecs/jp/qeucjpcodec.cpp
--- qt-everywhere-opensource-src-4.8.5/src/plugins/codecs/jp/qeucjpcodec.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/plugins/codecs/jp/qeucjpcodec.cpp	2013-06-21 16:39:23.969625000 +0800
@@ -254,8 +254,19 @@
 
 QByteArray QEucJpCodec::_name()
 {
     return "EUC-JP";
 }
+
+/*!
+    Returns the codec's mime name.
+*/
+QList<QByteArray> QEucJpCodec::_aliases()
+{
+    QList<QByteArray> list;
+    list << "EUCJP" // Qt 3 compat
+         << "x-euc-jp";
+    return list;
+}
 #endif // QT_NO_TEXTCODEC
 
 QT_END_NAMESPACE
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/plugins/codecs/jp/qeucjpcodec.h QtWeb/src/qt/src/plugins/codecs/jp/qeucjpcodec.h
--- qt-everywhere-opensource-src-4.8.5/src/plugins/codecs/jp/qeucjpcodec.h	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/plugins/codecs/jp/qeucjpcodec.h	2013-06-21 16:20:00.819000000 +0800
@@ -80,11 +80,11 @@
 #ifndef QT_NO_TEXTCODEC
 
 class QEucJpCodec : public QTextCodec {
 public:
     static QByteArray _name();
-    static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
+    static QList<QByteArray> _aliases();
     static int _mibEnum();
 
     QByteArray name() const { return _name(); }
     QList<QByteArray> aliases() const { return _aliases(); }
     int mibEnum() const { return _mibEnum(); }
diff -u5rwB --exclude=Makefile --exclude='Makefile.*' --exclude='*.prl' qt-everywhere-opensource-src-4.8.5/src/plugins/codecs/jp/qsjiscodec.cpp QtWeb/src/qt/src/plugins/codecs/jp/qsjiscodec.cpp
--- qt-everywhere-opensource-src-4.8.5/src/plugins/codecs/jp/qsjiscodec.cpp	2013-06-07 08:17:00.000000000 +0800
+++ QtWeb/src/qt/src/plugins/codecs/jp/qsjiscodec.cpp	2013-06-21 16:15:40.459625000 +0800
@@ -219,10 +219,12 @@
 */
 QList<QByteArray> QSjisCodec::_aliases()
 {
     QList<QByteArray> list;
     list << "SJIS" // Qt 3 compat
+         << "Shift-JIS"
+         << "x-sjis"
          << "MS_Kanji";
     return list;
 }
 #endif // QT_NO_TEXTCODEC
 
