FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix to 'Window Layout' options work properly by lucydodo · Pull Request #2435 · sqlitebrowser/sqlitebrowser · GitHub

Fix to 'Window Layout' options work properly - #2435

Merged
mgrojo merged 2 commits into
sqlitebrowser:masterfrom
lucydodo:dev
Oct 14, 2020
Merged

Fix to 'Window Layout' options work properly#2435
mgrojo merged 2 commits into
sqlitebrowser:masterfrom
lucydodo:dev

Conversation

Copy link
Copy Markdown
Member

This patch fixes issue #2434.

QAction* viewMenuPragmas = nullptr;

    // Add entries for toggling the visibility of main tabs
    for (QWidget* widget : {ui->structure, ui->browser, ui->pragmas, ui->query}) {
        QAction* action = ui->viewMenu->addAction(QIcon(":/icons/open_sql"), widget->accessibleName());
        action->setCheckable(true);
        // A few lines below are hidden because they are not needed for the review process.

        if (widget == ui->pragmas)
            viewMenuPragmas = action;
    }

I think it would be good to send the 'QTabWidget::tabCloseRequested' signal to the 'Edit Pragmas' tab for the above code, but after a few days of searching and finding out, I can't seem to do that. Therefore, when QAction is initalized, I modified the code to create and access a pointer variable pointing to QAction for 'Edit Pragmas'.

@mgrojo Please review the code if you possible. Thanks! 😄

lucydodo requested a review from mgrojo October 12, 2020 12:58
lucydodo self-assigned this Oct 12, 2020
lucydodo linked an issue Oct 12, 2020 that may be closed by this pull request
9 tasks

mgrojo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Awesome! Take a look to these comments before merging.

Comment thread src/MainWindow.cpp Outdated
Comment thread src/MainWindow.cpp Outdated

Copy link
Copy Markdown
Member Author

@mgrojo Thanks for the advice and reviews. I just modified and committed it. Since the existing viewMenuParams is a one-time variable, so accessed by findChild when necessary for conserve memory. 😄

mgrojo merged commit 9433601 into sqlitebrowser:master Oct 14, 2020

mgrojo commented Oct 14, 2020

Copy link
Copy Markdown
Member

Perfect. The object name could be useful in the future to manipulate these actions.

lucydodo deleted the dev branch October 29, 2020 17:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Window Layout option does not work properly

2 participants


Back | FazBrowse Home | New Git URL