Removed info button globally (#2804)

This commit is contained in:
AdavisSnakes 2021-11-06 05:41:18 -04:00 committed by GitHub
parent 236f85f83d
commit 4061887bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -52,7 +52,6 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
setAttribute(Qt::AA_UseHighDpiPixmaps); // always enabled on Qt >= 6.0.0
#endif
setLayoutDirection(Qt::LeftToRight);
// WARN!!! Put initialization code below this line. Code above this line is mandatory to be run
// First

View File

@ -619,7 +619,9 @@ bool MainWindow::openProject(const QString &file)
const char *s = rz_project_err_message(err);
QString msg = tr("Failed to open project: %1").arg(QString::fromUtf8(s));
RzListIter *it;
CutterRzListForeach(res, it, const char, s) { msg += "\n" + QString::fromUtf8(s); }
CutterRzListForeach (res, it, const char, s) {
msg += "\n" + QString::fromUtf8(s);
}
QMessageBox::critical(this, tr("Open Project"), msg);
rz_list_free(res);
return false;
@ -1134,7 +1136,7 @@ void MainWindow::updateHistoryMenu(QMenu *menu, bool redo)
bool history = true;
QList<QAction *> actions;
CutterRzListForeach(list, it, RzCoreSeekItem, undo) {
CutterRzListForeach (list, it, RzCoreSeekItem, undo) {
RzFlagItem *f = rz_flag_get_at(core->flags, undo->offset, true);
char *fname = NULL;
if (f) {
@ -1789,8 +1791,16 @@ void MainWindow::mousePressEvent(QMouseEvent *event)
}
}
bool MainWindow::eventFilter(QObject *, QEvent *event)
bool MainWindow::eventFilter(QObject *obj, QEvent *event)
{
// For every create event - disable context help and proceed to next event check
if (event->type() == QEvent::Create) {
if (obj->isWidgetType()) {
auto w = static_cast<QWidget *>(obj);
w->setWindowFlags(w->windowFlags() & (~Qt::WindowContextHelpButtonHint));
}
}
if (event->type() == QEvent::MouseButtonPress) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
if (mouseEvent->button() == Qt::ForwardButton || mouseEvent->button() == Qt::BackButton) {