trying to clear the context menu, but that does not work
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <QJsonObject>
|
||||
#include <QMenu>
|
||||
#include "rktwebview_qt.h"
|
||||
#include "utils.h"
|
||||
|
||||
static QAction *addMenuItemFromJson(Rktwebview_qt *owner,
|
||||
QMenu *menu,
|
||||
@@ -87,6 +88,7 @@ QMenu *buildMenuFromJson(Rktwebview_qt *self, const QString &menu_json, int sour
|
||||
QJsonDocument doc = QJsonDocument::fromJson(menu_json.toUtf8(), &err);
|
||||
|
||||
if (err.error != QJsonParseError::NoError || !doc.isObject()) {
|
||||
ERROR2("Json parse error for menu: %d, '%s'\n", err.error, err.errorString().toUtf8().constData());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user