Commit d582378b2587d37fca837ff837ff1a0602696e07
- Diff rendering mode:
- inline
- side by side
src/browsermainwindow.cpp
(6 / 6)
|   | |||
| 660 | 660 | this, SLOT(viewPageSource())); | |
| 661 | 661 | m_viewMenu->addAction(m_viewSourceAction); | |
| 662 | 662 | ||
| 663 | #if WEBKIT_TRUNK | ||
| 663 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 664 | 664 | m_viewMenu->addSeparator(); | |
| 665 | 665 | ||
| 666 | 666 | m_viewTextEncodingAction = new QAction(m_viewMenu); | |
| … | … | ||
| 796 | 796 | ||
| 797 | 797 | void BrowserMainWindow::aboutToShowTextEncodingMenu() | |
| 798 | 798 | { | |
| 799 | #if WEBKIT_TRUNK | ||
| 799 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 800 | 800 | m_viewTextEncodingMenu->clear(); | |
| 801 | |||
| 801 | |||
| 802 | 802 | int currentCodec = -1; | |
| 803 | 803 | QStringList codecs; | |
| 804 | 804 | QList<int> mibs = QTextCodec::availableMibs(); | |
| … | … | ||
| 807 | 807 | codecs.append(codec); | |
| 808 | 808 | } | |
| 809 | 809 | codecs.sort(); | |
| 810 | |||
| 810 | |||
| 811 | 811 | QString defaultTextEncoding = QWebSettings::globalSettings()->defaultTextEncoding(); | |
| 812 | 812 | currentCodec = codecs.indexOf(defaultTextEncoding); | |
| 813 | 813 | ||
| … | … | ||
| 832 | 832 | void BrowserMainWindow::viewTextEncoding(QAction *action) | |
| 833 | 833 | { | |
| 834 | 834 | Q_UNUSED(action); | |
| 835 | #if WEBKIT_TRUNK | ||
| 835 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 836 | 836 | Q_ASSERT(action); | |
| 837 | 837 | QList<QByteArray> codecs = QTextCodec::availableCodecs(); | |
| 838 | 838 | int offset = action->data().toInt(); | |
| … | … | ||
| 884 | 884 | m_viewSourceAction->setText(tr("Page S&ource")); | |
| 885 | 885 | m_viewSourceAction->setShortcut(tr("Ctrl+Alt+U")); | |
| 886 | 886 | m_viewFullScreenAction->setText(tr("&Full Screen")); | |
| 887 | #if WEBKIT_TRUNK | ||
| 887 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 888 | 888 | m_viewTextEncodingAction->setText(tr("Text Encoding")); | |
| 889 | 889 | #endif | |
| 890 | 890 |
|   | |||
| 33 | 33 | #include <qwebframe.h> | |
| 34 | 34 | #include <qwebview.h> | |
| 35 | 35 | ||
| 36 | #ifdef WEBKIT_TRUNK | ||
| 36 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 37 | 37 | #include <qwebelement.h> | |
| 38 | 38 | #endif | |
| 39 | 39 | ||
| … | … | ||
| 104 | 104 | if (!view) | |
| 105 | 105 | return; | |
| 106 | 106 | ||
| 107 | #ifdef WEBKIT_TRUNK | ||
| 107 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 108 | 108 | const QString selector = QLatin1String("%1[type=\"application/x-shockwave-flash\"]"); | |
| 109 | 109 | const QString mime = QLatin1String("application/futuresplash"); | |
| 110 | 110 |
src/tabbar.cpp
(1 / 1)
|   | |||
| 326 | 326 | event->acceptProposedAction(); | |
| 327 | 327 | loadUrl(url, TabWidget::NewSelectedTab); | |
| 328 | 328 | } | |
| 329 | |||
| 329 | |||
| 330 | 330 | QTabBar::dropEvent(event); | |
| 331 | 331 | } | |
| 332 | 332 | #endif |
src/webpage.cpp
(2 / 2)
|   | |||
| 38 | 38 | #include <qsettings.h> | |
| 39 | 39 | #include <qwebframe.h> | |
| 40 | 40 | ||
| 41 | #ifdef WEBKIT_TRUNK | ||
| 41 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 42 | 42 | #include <qwebelement.h> | |
| 43 | 43 | #endif | |
| 44 | 44 | ||
| … | … | ||
| 80 | 80 | { | |
| 81 | 81 | QList<WebPageLinkedResource> resources; | |
| 82 | 82 | ||
| 83 | #ifdef WEBKIT_TRUNK | ||
| 83 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 84 | 84 | QList<QWebElement> linkElements = mainFrame()->findAllElements(QLatin1String("html > head > link")); | |
| 85 | 85 | ||
| 86 | 86 | foreach (const QWebElement &linkElement, linkElements) { |
src/webview.cpp
(4 / 4)
|   | |||
| 81 | 81 | #include <qmenubar.h> | |
| 82 | 82 | #include <qwebframe.h> | |
| 83 | 83 | ||
| 84 | #ifdef WEBKIT_TRUNK | ||
| 84 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 85 | 85 | Q_DECLARE_METATYPE(QWebElement) | |
| 86 | 86 | #include <qinputdialog.h> | |
| 87 | 87 | #include <qmessagebox.h> | |
| … | … | ||
| 118 | 118 | m_zoomLevels << 110 << 120 << 133 << 150 << 170 << 200 << 240 << 300; | |
| 119 | 119 | } | |
| 120 | 120 | ||
| 121 | #if 1 // soon to be #if QT_VERSION <= 0x040600 | ||
| 121 | #if !(QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK)) | ||
| 122 | 122 | #include <qdir.h> | |
| 123 | 123 | QUrl WebView::guessUrlFromString(const QString &string) | |
| 124 | 124 | { | |
| … | … | ||
| 219 | 219 | connect(searchMenu, SIGNAL(triggered(QAction *)), this, SLOT(searchRequested(QAction *))); | |
| 220 | 220 | } | |
| 221 | 221 | ||
| 222 | #ifdef WEBKIT_TRUNK | ||
| 222 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 223 | 223 | QWebElement element = r.element(); | |
| 224 | 224 | if (!element.isNull() | |
| 225 | 225 | && element.tagName().toLower() == QLatin1String("input") | |
| … | … | ||
| 357 | 357 | } | |
| 358 | 358 | } | |
| 359 | 359 | ||
| 360 | #ifdef WEBKIT_TRUNK | ||
| 360 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 361 | 361 | void WebView::addSearchEngine() | |
| 362 | 362 | { | |
| 363 | 363 | QAction *action = qobject_cast<QAction*>(sender()); |
src/webview.h
(2 / 2)
|   | |||
| 79 | 79 | WebView(QWidget *parent = 0); | |
| 80 | 80 | WebPage *webPage() const { return m_page; } | |
| 81 | 81 | ||
| 82 | #if 1 // soon to be #if QT_VERSION <= 0x040600 | ||
| 82 | #if !(QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK)) | ||
| 83 | 83 | static QUrl guessUrlFromString(const QString &url); | |
| 84 | 84 | #endif | |
| 85 | 85 | ||
| … | … | ||
| 128 | 128 | void copyImageLocationToClipboard(); | |
| 129 | 129 | void bookmarkLink(); | |
| 130 | 130 | void searchRequested(QAction *action); | |
| 131 | #ifdef WEBKIT_TRUNK | ||
| 131 | #if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK) | ||
| 132 | 132 | void addSearchEngine(); | |
| 133 | 133 | #endif | |
| 134 | 134 |

