VirtualBox

Changeset 100652 in vbox


Ignore:
Timestamp:
Jul 19, 2023 2:27:22 PM (17 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10486. Do not instantiate QApplication if no active display server is detected on Linux.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r100069 r100652  
    397397            break;
    398398        VBGHDISPLAYSERVERTYPE enmDisplayServerType = VBGHDisplayServerTypeDetect();
    399         /* Default to X11 if anything else was found: */
     399        /* Abort before instantiating QApplication in case no active display server can be found to
     400         * prevent QApplication from aborting:  */
    400401        if (enmDisplayServerType == VBGHDISPLAYSERVERTYPE_NONE)
    401             enmDisplayServerType = VBGHDISPLAYSERVERTYPE_X11;
     402        {
     403            iResultCode = 1;
     404            Log(("We could not detect an active display server. Exiting."));
     405            RTStrmPrintf(g_pStdErr, "No active display server, X11 or Wayland, detected. Exiting.\n");
     406            break;
     407        }
    402408        if (VBGHDisplayServerTypeIsXAvailable(enmDisplayServerType))
    403409            /* Force using Qt platform plugin 'xcb', we have X11 specific code: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette