GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix to 'Window Layout' options work properly by lucydodo · Pull Request #2435 · sqlitebrowser/sqlitebrowser

Conversation

@lucydodo

@lucydodo lucydodo commented Oct 12, 2020

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! 😄

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
SeongTae Jeong
Fix to 'Window Layout' options work properly
c3aec5b
@lucydodo
lucydodo requested a review from mgrojo October 12, 2020 12:58
@lucydodo lucydodo self-assigned this Oct 12, 2020
@lucydodo lucydodo linked an issue Oct 12, 2020 that may be closed by this pull request
Window Layout option does not work properly #2434
Closed
5 of 9 tasks
@lucydodo lucydodo mentioned this pull request Oct 12, 2020
Window Layout option does not work properly #2434
Closed
5 of 9 tasks
mgrojo
mgrojo reviewed Oct 12, 2020
View reviewed changes

@mgrojo mgrojo left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Awesome! Take a look to these comments before merging.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/MainWindow.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/MainWindow.cpp Resolved

Uh oh!

There was an error while loading. Please reload this page.

SeongTae Jeong
Update code according @mgrojo's review
c4c7db6
@lucydodo

lucydodo commented Oct 14, 2020

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. 😄

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

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 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lucydodo
lucydodo deleted the dev branch October 29, 2020 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mgrojo mgrojo mgrojo left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@lucydodo lucydodo

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Window Layout option does not work properly

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@lucydodo @mgrojo
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.