Skip to content

Commit

Permalink
Remove Qt 5 ifdef guards and code
Browse files Browse the repository at this point in the history
  • Loading branch information
gxalpha committed Jun 10, 2023
1 parent 5c8c9e7 commit b9301b8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
5 changes: 0 additions & 5 deletions browser-client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,12 @@ void BrowserClient::GetViewRect(CefRefPtr<CefBrowser>, CefRect &rect)

bool BrowserClient::OnTooltip(CefRefPtr<CefBrowser>, CefString &text)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
std::string str_text = text;
QMetaObject::invokeMethod(
QCoreApplication::instance()->thread(), [str_text]() {
QToolTip::showText(QCursor::pos(), str_text.c_str());
});
return true;
#else
UNUSED_PARAMETER(text);
return false;
#endif
}

void BrowserClient::OnPaint(CefRefPtr<CefBrowser>, PaintElementType type,
Expand Down
8 changes: 0 additions & 8 deletions panel/browser-panel-client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ bool QCefBrowserClient::OnJSDialog(CefRefPtr<CefBrowser>, const CefString &,
CefRefPtr<CefJSDialogCallback> callback,
bool &)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
QString parentTitle = widget->parentWidget()->windowTitle();
std::string default_value = default_prompt_text;
QString msg_raw(message_text.ToString().c_str());
Expand Down Expand Up @@ -484,13 +483,6 @@ bool QCefBrowserClient::OnJSDialog(CefRefPtr<CefBrowser>, const CefString &,
QMetaObject::invokeMethod(QCoreApplication::instance()->thread(),
msgbox);
return true;
#else
UNUSED_PARAMETER(dialog_type);
UNUSED_PARAMETER(message_text);
UNUSED_PARAMETER(default_prompt_text);
UNUSED_PARAMETER(callback);
return false;
#endif
}

bool QCefBrowserClient::OnPreKeyEvent(CefRefPtr<CefBrowser> browser,
Expand Down

0 comments on commit b9301b8

Please sign in to comment.