Be able to launch a new non-private window from a private window
Needs ReviewPublic

Authored by abogical on Feb 27 2020, 2:08 AM.

Details

Reviewers
drosca
Group Reviewers
Falkon
Summary

BUG: 407319

Test Plan
  1. Open an incognito window
  2. Tools -> New Window

Expected:
New window should be normal and not be private.

Diff Detail

Repository
R875 Falkon
Branch
private-new-window
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23364
Build 23382: arc lint + arc unit
abogical created this revision.Feb 27 2020, 2:08 AM
Restricted Application added a project: Falkon. · View Herald TranscriptFeb 27 2020, 2:08 AM
Restricted Application added a subscriber: falkon. · View Herald Transcript
abogical requested review of this revision.Feb 27 2020, 2:08 AM
drosca requested changes to this revision.Feb 27 2020, 3:25 PM
drosca added a subscriber: drosca.

There shouldn't be more than one Falkon process sharing one profile. The only exception is the private process, that is using (should be) all profile data in read-only mode.

This revision now requires changes to proceed.Feb 27 2020, 3:25 PM
abogical updated this revision to Diff 76589.Feb 27 2020, 10:20 PM

It's not supposed to create a new process, as falkon is designed to be a single process application. Nevertheless, I added a condition to send a new window command if an instance is running. This avoids process creation overhead.

drosca requested changes to this revision.Mar 6 2020, 7:23 AM
drosca added inline comments.
src/lib/app/mainapplication.cpp
455

Rename to openNonPrivateWindow because it doesn'r return BrowserWindow.

457

Coding style + early return (same in start private browsing).

if (!isPrivate()) {
    createWindow(...);
    return;
}
458

QtSingleApplication::isRunning only tests if the same instance of Falkon is already running, and it makes sense to test it only during startup. In this case it will always return false.

This revision now requires changes to proceed.Mar 6 2020, 7:23 AM
abogical updated this revision to Diff 77099.Mar 6 2020, 12:42 PM

Requested changes done.

abogical marked 3 inline comments as done.Mar 6 2020, 12:48 PM