VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/globals/UIErrorString.h@ 82781

Last change on this file since 82781 was 76581, checked in by vboxsync, 5 years ago

Fe/QT: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/* $Id: UIErrorString.h 76581 2019-01-01 06:24:57Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIErrorString class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_globals_UIErrorString_h
19#define FEQT_INCLUDED_SRC_globals_UIErrorString_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* Qt includes: */
25#include <QString>
26
27/* GUI includes: */
28#include "UILibraryDefs.h"
29
30/* Other VBox includes: */
31#include <VBox/com/defs.h>
32
33/* Forward declarations: */
34class COMBaseWithEI;
35class COMErrorInfo;
36class COMResult;
37class CProgress;
38class CVirtualBoxErrorInfo;
39
40/** Namespace simplifying COM error formatting. */
41class SHARED_LIBRARY_STUFF UIErrorString
42{
43public:
44
45 /** Returns formatted @a rc information. */
46 static QString formatRC(HRESULT rc);
47 /** Returns full formatted @a rc information. */
48 static QString formatRCFull(HRESULT rc);
49 /** Returns formatted error information for passed @a comProgress. */
50 static QString formatErrorInfo(const CProgress &comProgress);
51 /** Returns formatted error information for passed @a comInfo and @a wrapperRC. */
52 static QString formatErrorInfo(const COMErrorInfo &comInfo, HRESULT wrapperRC = S_OK);
53 /** Returns formatted error information for passed @a comInfo. */
54 static QString formatErrorInfo(const CVirtualBoxErrorInfo &comInfo);
55 /** Returns formatted error information for passed @a comWrapper. */
56 static QString formatErrorInfo(const COMBaseWithEI &comWrapper);
57 /** Returns formatted error information for passed @a comRc. */
58 static QString formatErrorInfo(const COMResult &comRc);
59
60private:
61
62 /** Converts passed @a comInfo and @a wrapperRC to string. */
63 static QString errorInfoToString(const COMErrorInfo &comInfo, HRESULT wrapperRC = S_OK);
64};
65
66#endif /* !FEQT_INCLUDED_SRC_globals_UIErrorString_h */
67
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use