Closed
Bug 567066
Opened 16 years ago
Closed 16 years ago
Keep Qt related command line parameters during restart
Categories
(Core Graveyard :: Widget: Qt, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: steffen.imhof, Assigned: steffen.imhof)
Details
Attachments
(2 files)
|
2.59 KB,
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
|
1.51 KB,
patch
|
Details | Diff | Splinter Review |
If the browser restarts itself for example because extensions were enabled/disabled, it drops all command line parameters given previously.
This is not good for those that are Qt related for example specifying the graphics system with "-graphicssystem raster" gets lost after the restart which might lead to unexpected effects.
| Assignee | ||
Updated•16 years ago
|
Attachment #446465 -
Flags: review?(dougt)
Updated•16 years ago
|
Assignee: nobody → steffen.imhof
Status: NEW → ASSIGNED
Hardware: x86 → All
Comment 1•16 years ago
|
||
Comment on attachment 446465 [details] [diff] [review]
Patch to store all Qt parameters for later use
rob, can you take a look at this?
Attachment #446465 -
Flags: review?(dougt) → review?(rstrong)
Comment 2•16 years ago
|
||
Comment on attachment 446465 [details] [diff] [review]
Patch to store all Qt parameters for later use
> PRBool aBlankCommandLine = PR_FALSE)
> {
> aNative->Quit(); // release DDE mutex, if we're holding it
>
> // Restart this process by exec'ing it into the current process
> // if supported by the platform. Otherwise, use NSPR.
>
> if (aBlankCommandLine) {
>+#if defined(MOZ_WIDGET_QT)
>+ // Remove only arguments not given to Qt
>+ gRestartArgc = gQtOnlyArgc;
>+ gRestartArgv = gQtOnlyArgv;
>+ gRestartArgv[gRestartArgc] = nsnull;
This last line seems unnecessary when you're setting the last element to null when initialising gQtOnlyArgv.
> #if defined(MOZ_WIDGET_QT)
> QApplication app(gArgc, gArgv);
>+
>+ QStringList nonQtArguments = app.arguments();
>+ gQtOnlyArgc = 1;
>+ gQtOnlyArgv = (char**) malloc(sizeof(char*) * (gRestartArgc - nonQtArguments.size() + 1));
>+
>+ // copy binary path
>+ gQtOnlyArgv[0] = gRestartArgv[0];
>+
>+ for (int i = 1; i < gRestartArgc; ++i) {
>+ if (!nonQtArguments.contains(gRestartArgv[i])) {
>+ // copy arguments used by Qt for later
>+ gQtOnlyArgv[gQtOnlyArgc++] = gRestartArgv[i];
>+ }
>+ }
>+ gQtOnlyArgv[gQtOnlyArgc] = 0;
Use nsnull please.
r=me with those changes
Attachment #446465 -
Flags: review?(rstrong) → review+
| Assignee | ||
Comment 3•16 years ago
|
||
Updated version of the patch that addresses the review issues, also it is refreshed to the latest mozilla-central code and the memory allocation is made bigger, because it was too small.
Comment 4•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•