VBoxProblemReporter.cpp revision c98fb3e16fcd571a790eab772c0c66173d225205
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* VBoxProblemReporter class implementation
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License as published by the Free Software Foundation,
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
* distribution. VirtualBox OSE is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "VBoxProblemReporter.h"
#include "VBoxGlobal.h"
#include "VBoxSelectorWnd.h"
#include "VBoxConsoleWnd.h"
#include "VBoxAboutDlg.h"
#include <qmessagebox.h>
#include <qprogressdialog.h>
#include <qcursor.h>
#include <qprocess.h>
#include <qeventloop.h>
#include <qregexp.h>
#ifdef Q_WS_MAC
# include <qpushbutton.h>
#endif
#if defined (Q_WS_WIN32)
#include <Htmlhelp.h>
#endif
/**
* A QProgressDialog enhancement that allows to:
*
* 1) prevent closing the dialog when it has no cancel button;
* 2) effectively track the IProgress object completion
* (w/o using IProgress::waitForCompletion() and w/o blocking the UI thread
* in any other way for too long).
*
* @note The CProgress instance is passed as a non-const reference to the
* constructor (to memorize COM errors if they happen), and therefore
* must not be destroyed before the created VBoxProgressDialog instance
* is destroyed.
*/
class VBoxProgressDialog : public QProgressDialog
{
public:
const char *aName = 0)
, mCalcelEnabled (true)
, mLoopLevel (-1)
, mEnded (false)
{
if (mOpCount > 1)
else
setTotalSteps (100);
setCancelEnabled (false);
setProgress (0);
}
int run (int aRefreshInterval);
bool cancelEnabled() const { return mCalcelEnabled; }
protected:
virtual void timerEvent (QTimerEvent *e);
virtual void closeEvent (QCloseEvent *e)
{
if (mCalcelEnabled)
QProgressDialog::closeEvent (e);
else
e->ignore();
}
private:
bool mCalcelEnabled;
int mLoopLevel;
bool mEnded;
static const char *sOpDescTpl;
};
//static
{
{
/* start a refresh timer */
/* enter the modal loop */
killTimers();
mLoopLevel = -1;
mEnded = false;
return result();
}
return Rejected;
}
//virtual
{
bool justEnded = false;
{
/* dismiss the dialog -- the progress is no more valid */
{
setProgress (100);
}
else
}
if (mEnded)
{
if (mLoopLevel != -1)
{
/* we've entered the loop in run() */
{
/* it's our loop, exit it */
}
else
{
/* restart the timer to watch for the loop level to drop */
if (justEnded)
startTimer (50);
}
}
else
return;
}
/* update the progress dialog */
{
}
}
/** @class VBoxProblemReporter
*
* The VBoxProblemReporter class is a central place to handle all
* runtime and require the user's attention. Its role is to
* him the opportunity to select an action (when appropriate).
*
* Every problem sutiation has its own (correspondingly named) method in
* this class that takes a list of arguments necessary to describe the
* situation and to provide the appropriate actions. The method then
* returns the choice to the caller.
*/
/**
* Returns a reference to the global VirtualBox problem reporter instance.
*/
{
return vboxProblem_instance;
}
bool VBoxProblemReporter::isValid()
{
return qApp != 0;
}
// Helpers
/////////////////////////////////////////////////////////////////////////////
/**
* Shows a message box of the given type with the given text and with buttons
* according to arguments b1, b2 and b3 (in the same way as QMessageBox does
* it), and returns the user's choice.
*
* When all button arguments are zero, a single 'Ok' button is shown.
*
* If autoConfirmId is not null, then the message box will contain a
* checkbox "Don't show this message again" below the message text and its
* state will be saved in the global config. When the checkbox is in the
* checked state, this method doesn't actually show the message box but
* returns immediately. The return value in this case is the same as if the
* user has pressed the Enter key or the default button, but with
* AutoConfirmed bit set (AutoConfirmed alone is returned when no default
* button is defined in button arguments).
*
* @param parent
* parent widget or 0 to use the desktop as the parent. Also,
* #mainWindowShown can be used to determine the currently shown VBox
* main window (Selector or Console)
* @param type
* one of values of the Type enum, that defines the message box
* title and icon
* @param msg
* message text to display (can contain sinmple Qt-html tags)
* @param details
* detailed message description displayed under the main message text using
* QTextEdit (that provides rich text support and scrollbars when necessary).
* If equals to QString::null, no details text box is shown
* @param autoConfirmId
* ID used to save the auto confirmation state across calls. If null,
* the auto confirmation feature is turned off (and no checkbox is shown)
* @param b1
* first button code or 0, see QIMessageBox
* @param b2
* second button code or 0, see QIMessageBox
* @param b3
* third button code or 0, see QIMessageBox
* @param name
* name of the underlying QIMessageBox object. If NULL, a value of
* autoConfirmId is used.
*
* @return
* code of the button pressed by the user
*/
const char *autoConfirmId,
const char *name)
{
if (autoConfirmId)
{
int rc = AutoConfirmed;
return rc;
}
}
switch (type)
{
default:
case Info:
break;
case Question:
break;
case Warning:
break;
case Error:
break;
case Critical:
break;
}
if (!name)
if (details)
{
box->setDetailsShown (true);
}
if (autoConfirmId)
{
box->setFlagChecked (false);
}
if (autoConfirmId)
{
if (box->isFlagChecked())
{
msgs << autoConfirmId;
}
}
delete box;
return rc;
}
/** @fn message (QWidget *, Type, const QString &, const char *, int, int, int, const char *)
*
* A shortcut to #message() that doesn't require to specify the details
* text (QString::null is assumed).
*/
/**
* A shortcut to #message() that shows 'Yes' and 'No' buttons ('Yes' is the
* default) and returns true when the user selects Yes.
*/
bool VBoxProblemReporter::messageYesNo (
const char *autoConfirmId,
const char *name
)
{
}
/** @fn messageYesNo (QWidget *, Type, const QString &, const char *, const char *)
*
* A shortcut to #messageYesNo() that doesn't require to specify the details
* text (QString::null is assumed).
*/
/**
* Shows a modal progress dialog using a CProgress object passed as an
* argument to track the progress.
*
* @param aProgress progress object to track
* @param aTitle title prefix
* @param aParent parent widget
* @param aMinDuration time (ms) that must pass before the dialog appears
*/
int aMinDuration)
{
aParent, "progressDlg");
/* run the dialog with the 100 ms refresh interval */
return true;
}
/**
* Returns what main window (selector or console) is now shown, or
* zero if none of them. The selector window takes precedence.
*/
{
/* It may happen that this method is called during VBoxGlobal
* initialization or even after it failed (for example, to show some
* error message). Return no main window in this case. */
if (!vboxGlobal().isValid())
return 0;
#if defined (VBOX_GUI_SEPARATE_VM_PROCESS)
if (vboxGlobal().isVMConsoleProcess())
{
return &vboxGlobal().consoleWnd();
}
else
{
return &vboxGlobal().selectorWnd();
}
#else
return &vboxGlobal().consoleWnd();
return &vboxGlobal().selectorWnd();
#endif
return 0;
}
// Problem handlers
/////////////////////////////////////////////////////////////////////////////
{
tr ("Failed to open <tt>%1</tt>. Make sure your desktop environment "
"can properly handle URLs of this type.")
}
{
(0, VBoxProblemReporter::Error,
tr ("<p>Could not find a language file for the language "
"<b>%1</b> in the directory <b><nobr>%2</nobr></b>.</p>"
"<p>The language will be temporarily reset to the system "
"default language. Please go to the <b>Preferences</b> "
"dialog which you can open from the <b>File</b> menu of the "
"main VirtualBox window, and select one of the existing "
"languages on the <b>Language</b> page.</p>")
}
{
(0, VBoxProblemReporter::Error,
tr ("<p>Could not load the language file <b><nobr>%1</nobr></b>. "
"<p>The language will be temporarily reset to English (built-in). "
"Please go to the <b>Preferences</b> "
"dialog which you can open from the <b>File</b> menu of the "
"main VirtualBox window, and select one of the existing "
"languages on the <b>Language</b> page.</p>")
}
{
message (
0,
tr ("<p>Failed to initialize COM or to find the VirtualBox COM server. "
"Most likely, the VirtualBox server is not running "
"or failed to start.</p>"
"<p>The application will now terminate.</p>"),
);
}
{
message (
0,
tr ("<p>Failed to create the VirtualBox COM object.</p>"
"<p>The application will now terminate.</p>"),
);
}
{
tr ("<p>Failed to load the global GUI configuration.</p>"
"<p>The application will now terminate.</p>"),
}
{
message (
tr ("<p>Failed to save the global GUI configuration.<p>"),
);
}
{
message (
tr ("Failed to set global VirtualBox properties."),
);
}
{
/* if there is no error info available, it should mean that
* IMachine::GetUSBController(), IHost::GetUSBDevices() etc. just returned
* E_NOTIMPL, as for the OSE version. Don't show the error message in this
* case since it's normal. */
return;
tr ("Failed to access the USB subsystem."),
"cannotAccessUSB");
}
{
message (
tr ("Failed to create a new virtual machine."),
);
}
{
message (
tr ("Failed to create a new virtual machine <b>%1</b>.")
);
}
void VBoxProblemReporter::
{
message (
tr ("Failed to apply the settings to the virtual machine <b>%1</b>.")
);
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to save the settings of the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
/**
* @param strict if |true| then show the message even if there is no basic
* error info available
*/
bool strict /* = true */,
{
return;
tr ("Failed to load the settings of the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to start the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
{
message (
tr ("Failed to start the virtual machine <b>%1</b>.")
);
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to pause the execution of the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to resume the execution of the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to save the state of the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
{
message (
tr ("Failed to save the state of the virtual machine <b>%1</b>.")
);
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to create a snapshot of the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
{
message (
tr ("Failed to create a snapshot of the virtual machine <b>%1</b>.")
);
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to stop the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to remove the virtual machine <b>%1</b>.")
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to discard the saved state of the virtual machine <b>%1</b>.")
formatErrorInfo (res));
}
{
message (
tr ("Failed to discard the snapshot <b>%1</b> of the virtual "
"machine <b>%2</b>.")
}
{
message (
tr ("Failed to discard the snapshot <b>%1</b> of the virtual "
"machine <b>%2</b>.")
}
{
message (
tr ("Failed to discard the current state of the virtual "
"machine <b>%1</b>.")
}
{
message (
tr ("Failed to discard the current state of the virtual "
"machine <b>%1</b>.")
}
{
message (
tr ("Failed to discard the current snapshot and the current state "
"of the virtual machine <b>%1</b>.")
}
{
message (
tr ("Failed to discard the current snapshot and the current state "
"of the virtual machine <b>%1</b>.")
}
{
message (
tr ("There is no virtual machine named <b>%1</b>.")
);
}
{
if (machine.GetAccessible())
{
"the virtual machine <b>%1</b>?</p>"
"<p>This operation cannot be undone.</p>")
}
else
{
/* this should be in sync with VBoxVMListBoxItem::recache() */
"virtual machine <b>%1</b>?</p>"
"<p>You will no longer be able to register it back from "
"GUI.</p>")
}
}
{
return messageYesNo (
&vboxGlobal().selectorWnd(),
tr ("<p>Are you sure you want to discard the saved state of "
"the virtual machine <b>%1</b>?</p>"
"<p>This operation is equivalent to resetting or powering off "
"the machine without doing a proper shutdown by means of the "
"guest OS.</p>")
);
}
{
return messageYesNo (
tr ("<p>Releasing this media image will detach it from the "
"following virtual machine(s): <b>%1</b>.</p>"
"<p>Continue?</p>")
"confirmReleaseImage"
);
}
{
message (
Info,
tr (
"<p>The image file <b>%1</b> already exists. "
"You cannot create a new virtual hard disk that uses this file, "
"because it can be already used by another virtual hard disk.</p>"
"<p>Please specify a different image file name.</p>"
)
);
}
{
tr ("<p>Do you want to delete this hard disk's image file "
"<nobr><b>%1</b>?</nobr></p>"
"<p>If you select <b>No</b> then the virtual hard disk will be "
"unregistered and removed from the collection, but the image file "
"will be left on your physical disk.</p>"
"<p>If you select <b>Yes</b> then the image file will be permanently "
"deleted after unregistering the hard disk. This operation "
"cannot be undone.</p>")
0, /* autoConfirmId */
}
const CVirtualDiskImage &vdi)
{
/* below, we use CHardDisk (hd) to preserve current error info
* for formatErrorInfo() */
tr ("Failed to delete the virtual hard disk image <b>%1</b>.")
formatErrorInfo (vdi));
}
{
tr ("<p>Do you want to remove (unregister) the virtual hard disk "
"<nobr><b>%1</b>?</nobr></p>")
0, /* autoConfirmId */
}
) {
tr ("Failed to create the virtual hard disk image <nobr><b>%1</b>.</nobr>")
}
{
tr ("Failed to attach a hard disk image with UUID %1 "
"to the device slot %2 of the controller %3 of the machine <b>%4</b>.")
formatErrorInfo (m));
}
{
tr ("Failed to detach a hard disk image "
"from the device slot %1 of the controller %2 of the machine <b>%3</b>.")
formatErrorInfo (m));
}
{
tr ("Failed to register the %1 <nobr><b>%2</b></nobr>.")
formatErrorInfo (vbox));
}
{
tr ("Failed to unregister the %1 <nobr><b>%2</b></nobr>.")
formatErrorInfo (vbox));
}
{
message (
tr ("Failed to create a new session."),
);
}
void VBoxProblemReporter::cannotOpenSession (
) {
message (
tr ("Failed to open a session for the virtual machine <b>%1</b>.")
);
}
{
else
else
else
AssertMsgFailed (("Not a valid CUnknown\n"));
tr ("Failed to get the accessibility state of the media "
"<nobr><b>%1</b></nobr>. Some of the registered media may "
"become inaccessible.")
formatErrorInfo (unk));
}
#if defined Q_WS_WIN
{
tr ("Failed to create the host network interface <b>%1</b>.")
formatErrorInfo (host));
}
{
tr ("Failed to create the host network interface <b>%1</b>.")
}
{
tr ("Failed to remove the host network interface <b>%1</b>.")
formatErrorInfo (host));
}
{
tr ("Failed to remove the host network interface <b>%1</b>.")
}
#endif
{
/* preserve the current error info before calling the object again */
tr ("Failed to attach the USB device <b>%1</b> "
"to the virtual machine <b>%2</b>.")
formatErrorInfo (res));
}
const CVirtualBoxErrorInfo &error)
{
tr ("Failed to attach the USB device <b>%1</b> "
"to the virtual machine <b>%2</b>.")
formatErrorInfo (error));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to detach the USB device <b>%1</b> "
"from the virtual machine <b>%2</b>.")
formatErrorInfo (res));
}
const CVirtualBoxErrorInfo &error)
{
tr ("Failed to detach the USB device <b>%1</b> "
"from the virtual machine <b>%2</b>.")
formatErrorInfo (error));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to create a shared folder <b>%1</b> "
"(pointing to <nobr><b>%2</b></nobr>) "
"for the virtual machine <b>%3</b>.")
formatErrorInfo (res));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to remove the shared folder <b>%1</b> "
"(pointing to <nobr><b>%2</b></nobr>) "
"from the virtual machine <b>%3</b>.")
formatErrorInfo (res));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to create a shared folder <b>%1</b> "
"(pointing to <nobr><b>%2</b></nobr>) "
"for the virtual machine <b>%3</b>.")
formatErrorInfo (res));
}
{
/* preserve the current error info before calling the object again */
tr ("Failed to remove the shared folder <b>%1</b> "
"(pointing to <nobr><b>%2</b></nobr>) "
"from the virtual machine <b>%3</b>.")
formatErrorInfo (res));
}
{
tr ("<p>Could not find the VirtualBox Guest Additions "
"CD image file <nobr><b>%1</b></nobr> or "
"<nobr><b>%2</b>.</nobr></p><p>Do you want to "
"download this CD image from the Internet?</p>")
0, /* autoConfirmId */
}
{
tr ("<p>Failed to download the VirtualBox Guest Additions CD "
"image from <nobr><a href=\"%1\">%2</a>.</nobr></p><p>%3</p>")
}
{
tr ("<p>Are you sure you want to download the VirtualBox "
"Guest Additions CD image from "
"<nobr><a href=\"%1\">%2</a></nobr> "
0, /* autoConfirmId */
}
{
tr ("<p>The VirtualBox Guest Additions CD image has been "
"successfully downloaded from "
"<nobr><a href=\"%1\">%2</a></nobr> "
"and saved locally as <nobr><b>%3</b>.</nobr></p>"
"<p>Do you want to register this CD image and mount it "
0, /* autoConfirmId */
}
const QString &aInstalledVer,
const QString &aExpectedVer)
{
tr ("<p>VirtualBox Guest Additions installed in the Guest OS are too "
"old: the installed version is %1, the expected version is %2. "
"Some features that require Guest Additions (mouse integration, "
"guest display auto-resize) will most likely stop "
"working properly.</p>"
"<p>Please update Guest Additions to the current version by choosing "
"<b>Install Guest Additions</b> from the <b>Devices</b> "
"menu.</p>")
"warnAboutTooOldAdditions");
}
const QString &aInstalledVer,
const QString &aExpectedVer)
{
tr ("<p>VirtualBox Guest Additions installed in the Guest OS are "
"outdated: the installed version is %1, the expected version is %2. "
"Some features that require Guest Additions (mouse integration, "
"guest display auto-resize) may not work as expected.</p>"
"<p>It is recommended to update Guest Additions to the current version "
" by choosing <b>Install Guest Additions</b> from the <b>Devices</b> "
"menu.</p>")
"warnAboutOldAdditions");
}
const QString &aInstalledVer,
const QString &aExpectedVer)
{
tr ("<p>VirtualBox Guest Additions installed in the Guest OS are "
"too recent for this version of VirtualBox: the installed version "
"is %1, the expected version is %2.</p>"
"<p>Using a newer version of Additions with an older version of "
"VirtualBox is not supported. Please install the current version "
"of Guest Additions by choosing <b>Install Guest Additions</b> "
"from the <b>Devices</b> menu.</p>")
"warnAboutNewAdditions");
}
/** @return false if the dialog wasn't actually shown (i.e. it was autoconfirmed) */
{
tr ("<p>You have <b>clicked the mouse</b> inside the Virtual Machine display "
"or pressed the <b>host key</b>. This will cause the Virtual Machine to "
"<b>capture</b> the host mouse pointer (only if the mouse pointer "
"integration is not currently supported by the guest OS) and the "
"keyboard, which will make them unavailable to other applications "
"running on your host machine."
"</p>"
"<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the "
"keyboard and mouse (if it is captured) and return them to normal "
"operation. The currently assigned host key is shown on the status bar "
"at the bottom of the Virtual Machine window, next to the "
"<img src=hostkey_16px.png/> icon. This icon, together "
"with the mouse icon placed nearby, indicate the current keyboard "
"and mouse capture state."
"</p>"),
"remindAboutInputCapture");
return !(rc & AutoConfirmed);
}
/** @return false if the dialog wasn't actually shown (i.e. it was autoconfirmed) */
{
tr ("<p>You have the <b>Auto capture keyboard</b> option turned on. "
"This will cause the Virtual Machine to automatically <b>capture</b> "
"the keyboard every time the VM window is activated and make it "
"unavailable to other applications running on your host machine: "
"when the keyboard is captured, all keystrokes (including system ones "
"like Alt-Tab) will be directed to the VM."
"</p>"
"<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the "
"keyboard and mouse (if it is captured) and return them to normal "
"operation. The currently assigned host key is shown on the status bar "
"at the bottom of the Virtual Machine window, next to the "
"<img src=hostkey_16px.png/> icon. This icon, together "
"with the mouse icon placed nearby, indicate the current keyboard "
"and mouse capture state."
"</p>"),
"remindAboutAutoCapture");
return !(rc & AutoConfirmed);
}
/** @return false if the dialog wasn't actually shown (i.e. it was autoconfirmed) */
{
static const char *kNames [2] =
{
"remindAboutMouseIntegrationOff",
"remindAboutMouseIntegrationOn"
};
/* Close the previous (outdated) window if any. We use kName as
* autoConfirmId which is also used as the widget name by default. */
{
"QIMessageBox");
if (outdated)
}
if (supportsAbsolute)
{
tr ("<p>The Virtual Machine reports that the guest OS supports "
"<b>mouse pointer integration</b>. This means that you do not "
"need to <i>capture</i> the mouse pointer to be able to use it "
"in your guest OS -- all "
"mouse actions you perform when the mouse pointer is over the "
"Virtual Machine's display are directly sent to the guest OS. "
"If the mouse is currently captured, it will be automatically "
"uncaptured."
"</p>"
"<p>The mouse icon on the status bar will look like "
"<img src=mouse_seamless_16px.png/> to inform you that mouse "
"pointer integration is supported by the guest OS and is "
"currently turned on."
"</p>"
"<p><b>Note</b>: Some applications may behave incorrectly in "
"mouse pointer integration mode. You can always disable it for "
"the current session (and enable it again) by selecting the "
"corresponding action from the menu bar."
"</p>"),
return !(rc & AutoConfirmed);
}
else
{
tr ("<p>The Virtual Machine reports that the guest OS does not "
"support <b>mouse pointer integration</b> in the current video "
"mode. You need to capture the mouse (by clicking over the VM "
"display or pressing the host key) in order to use the "
"mouse inside the guest OS.</p>"),
kNames [0] /* autoConfirmId */);
return !(rc & AutoConfirmed);
}
}
/** @return false if the dialog wasn't actually shown (i.e. it was autoconfirmed) */
{
&vboxGlobal().consoleWnd(),
Info,
tr (
"<p>The Virtual Machine is currently in the <b>Paused</b> state and "
"therefore does not accept any keyboard or mouse input. If you want to "
"continue to work inside the VM, you need to resume it by selecting the "
"corresponding action from the menu bar.</p>"
),
"remindAboutPausedVMInput"
);
return !(rc & AutoConfirmed);
}
/** @return true if the user has chosen to show the Disk Manager Window */
{
&vboxGlobal().selectorWnd(),
"floppy media are not currently accessible. As a result, you will "
"not be able to operate virtual machines that use these media until "
"they become accessible later.</p>"
"<p>Press <b>OK</b> to open the Virtual Disk Manager window and "
"see what media are inaccessible, or press <b>Ignore</b> to "
"ignore this message.</p>"),
"remindAboutInaccessibleMedia",
);
}
/**
* @param fullscreen hot key as defined in the menu
* @param current host key as in the global settings
* @return true if the user has chosen to go fullscreen.
*/
{
tr ("<p>The virtual machine window will be now switched to "
"<b>fullscreen</b> mode. "
"You can go back to windowed mode at any time by pressing "
"<b>%1</b>. Note that the <i>Host</i> key is currently "
"defined as <b>%1</b>.</p>"
"<p>Note that the main menu bar is hidden fullscreen mode. You "
"can access it by pressing <b>Host+Home</b>.</p>")
"remindAboutGoingFullscreen");
}
/**
* @param fullscreen hot key as defined in the menu
* @param current host key as in the global settings
* @return true if the user has chosen to go fullscreen.
*/
{
tr ("<p>The virtual machine window will be now switched to "
"<b>Seamless</b> mode. "
"You can go back to windowed mode at any time by pressing "
"<b>%1</b>. Note that the <i>Host</i> key is currently "
"defined as <b>%1</b>.</p>"
"<p>Note that the main menu bar is hidden seamless mode. You "
"can access it by pressing <b>Host+Home</b>.</p>")
"remindAboutGoingSeamless");
}
{
const char *kName = "remindAboutWrongColorDepth";
/* Close the previous (outdated) window if any. We use kName as
* autoConfirmId which is also used as the widget name by default. */
{
if (outdated)
}
tr ("<p>The virtual machine window is optimized to work in "
"<b>%1 bit</b> color mode but the color quality of the "
"virtual display is currently set to <b>%2 bit</b>.</p>"
"<p>Please open the display properties dialog of the guest OS and "
"select a <b>%3 bit</b> color mode, if it is available, to "
"gain maximum performance of the virtual video subsystem.</p>"
"<p><b>Note</b>. Some operating systems, like OS/2, may actually "
"work in 32 bit mode but report it as 24 bit "
"(16 million colors). You may try to select a different color "
"quality to see if this message disappears or you can simply "
"disable the message now if you are sure the required color "
"quality (%4 bit) is not available in the given guest OS.</p>")
kName);
}
{
return message (
tr ("<p>You didn't attach any hard disk to the created virtual machine. "
"As a result, the machine will not be able to boot unless you attach "
"a hard disk with the guest operating system or some other bootable "
"media to it later using the machine settings dialog or the First "
"Run Wizard.</p><p>Do you want to continue?</p>"),
0, /* autoConfirmId */
}
{
tr ("<p>Cannot run VirtualBox in <i>VM Selector</i> "
"mode due to local restrictions.</p>"
"<p>The application will now terminate.</p>"));
}
{
/// @todo (r=dmik) it's just a preliminary box. We need to:
// - for fatal errors and non-fatal with-retry errors, listen for a
// VM state signal to automatically close the message if the VM
// (externally) leaves the Paused state while it is shown.
// - make warning messages modeless
if (fatal)
{
/* the machine must be paused on fatal errors */
}
{
}
else
{
}
"cellpadding=0 width=100%>"
"<tr><td><p>%1.</p></td></tr>"
"</table><p></p>")
"cellpadding=0 width=100%>"
"<tr><td>%1</td><td>%2</td></tr>"
"<tr><td>%3</td><td>%4</td></tr>"
"</table>")
severity);
int rc = 0;
{
tr ("<p>A fatal error has occurred during virtual machine execution! "
"The virtual machine will be powered off. It is suggested to "
"use the clipboard to copy the following error message for "
"further examination:</p>"),
/* always power down after a fatal error */
}
{
tr ("<p>An error has occurred during virtual machine execution! "
"The error details are shown below. You can try to correct "
"the described error and resume the virtual machine "
"execution.</p>"),
}
else
{
tr ("<p>The virtual machine execution may run into an error "
"condition as described below. "
"You may ignore this message, but it is suggested to perform "
"an appropriate action to make sure the described error will "
"not happen.</p>"),
}
}
/* static */
{
}
/* static */
{
"cellpadding=0 width=100%>"
"<tr><td><p>%1.</p></td></tr>"
"</table><p></p>")
formatted += "<table bgcolor=#EEEEEE border=0 cellspacing=0 "
"cellpadding=0 width=100%>";
bool haveResultCode = false;
if (aInfo.isBasicAvailable())
{
#if defined (Q_WS_WIN)
bool haveComponent = true;
bool haveInterfaceID = true;
#else // !Q_WS_WIN
haveResultCode = true;
#endif
if (haveResultCode)
{
#if defined (Q_WS_WIN)
/* format the error code, masking off the top 16 bits */
/* try again with masked off top 16bit if not found */
#else
#endif
}
if (haveComponent)
if (haveInterfaceID)
{
if (aInfo.interfaceName())
}
{
if (aInfo.calleeName())
}
}
if (FAILED (aWrapperRC) &&
{
#if defined (Q_WS_WIN)
/* format the error code */
/* try again with masked off top 16bit if not found */
#else
#endif
}
formatted += "</table>";
return formatted;
}
// Public slots
/////////////////////////////////////////////////////////////////////////////
void VBoxProblemReporter::showHelpWebDialog()
{
}
{
}
{
#ifndef VBOX_OSE
#if defined (Q_WS_WIN32)
char szDocsPath[RTPATH_MAX];
char szViewerPath[RTPATH_MAX];
int rc;
#endif
#endif /* VBOX_OSE */
}
{
}
/** @fn vboxProblem
*
* Shortcut to the static VBoxProblemReporter::instance() method, for
* convenience.
*/