1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Using QtWebKit version detection at run-time. Closes #81

- detecting wheter to delete or not QWebInspector on close
- QWebInspector can be deleted with 533.3 WebKit
  but causing crash when using higher
This commit is contained in:
nowrep 2011-12-23 10:24:03 +01:00
parent 82870d5531
commit 1f3a16b298
2 changed files with 12 additions and 9 deletions

View File

@ -65,12 +65,14 @@ function onEditClick(box) {
$('body').append('<div id="fadeOverlay" style="opacity:0.95;display:none;position:fixed;left:0;' +
'top:0;width:100%;height:100%;z-index:9999;background:grey;">' +
'<div id="overlay-edit" onkeypress="return onEditKeyPress(event)"><img src="' + $(box).children('img').first().attr('src') + '"> ' +
'<table class="formTable"><tr><td>' + URL + ': </td><td><input type="text" ' +
'id="formUrl" value="' + boxUrl + '"></td></tr>' +
'<tr><td>' + TITLE + ': </td><td><input maxlength="25" type="text" id="formTitle" value="' + boxTitle +
'"></td></tr></table><input type="submit" value="' + EDIT + '" onClick="boxEdited()"></div>' +
'</div>');
'<div id="overlay-edit" onkeypress="return onEditKeyPress(event)">' +
'<img src="' + $(box).children('img').first().attr('src') + '"> ' +
'<table class="formTable"><tr><td>' + URL + ': </td><td>' +
'<input type="text" id="formUrl" value="' + boxUrl + '"></td></tr>' +
'<tr><td>' + TITLE + ': </td><td>' +
'<input maxlength="25" type="text" id="formTitle" value="' + boxTitle +
'"></td></tr></table><input type="submit" value="' + EDIT + '" onClick="boxEdited()">' +
'</div></div>');
$('#fadeOverlay').css({'filter' : 'alpha(opacity=95)'}).fadeIn();
$('#fadeOverlay').click(function() { $(this).fadeOut("slow", function() {$("#fadeOverlay").remove();}); });

View File

@ -36,9 +36,10 @@ WebInspectorDockWidget::WebInspectorDockWidget(QupZilla* mainClass)
void WebInspectorDockWidget::close()
{
#if (QTWEBKIT_VERSION < QTWEBKIT_VERSION_CHECK(2, 2, 0))
delete m_inspector.data();
#endif
if (qWebKitVersion() == "533.3") {
delete m_inspector.data();
}
p_QupZilla->weView()->webTab()->setInspectorVisible(false);
hide();