Adding comments and changing QApplication org/app names
Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
This commit is contained in:
@@ -22,24 +22,17 @@ namespace AzQtComponents
|
||||
: QApplication(argc, argv)
|
||||
{
|
||||
// Use a common Qt settings path for applications that don't register their own application name
|
||||
if (QApplication::applicationName().isEmpty())
|
||||
{
|
||||
QApplication::setOrganizationName("Amazon");
|
||||
QApplication::setOrganizationDomain("amazon.com");
|
||||
QApplication::setApplicationName("O3DEToolsApplication");
|
||||
}
|
||||
QApplication::setOrganizationName("O3DE");
|
||||
QApplication::setOrganizationDomain("o3de.com");
|
||||
QApplication::setApplicationName("O3DEToolsApplication");
|
||||
|
||||
AzQtComponents::PrepareQtPaths();
|
||||
|
||||
QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
|
||||
|
||||
}
|
||||
|
||||
void AzQtApplication::setDpiScaling()
|
||||
{
|
||||
// Must be set before QApplication is initialized, so that we support HighDpi monitors, like the Retina displays
|
||||
// on Windows 10
|
||||
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
|
||||
|
||||
@@ -23,7 +23,10 @@ namespace AzQtComponents
|
||||
{
|
||||
public:
|
||||
AzQtApplication(int& argc, char** argv);
|
||||
void static setDpiScaling();
|
||||
|
||||
//! DPI Scaling so that we support HighDpi monitors, like the Retina displays on Windows 10
|
||||
//! Must be set before QApplication is initialized,
|
||||
static void setDpiScaling();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace AzToolsFramework
|
||||
return false;
|
||||
}
|
||||
|
||||
void AzQtTraceLogger::WriteStartupLog(char name[])
|
||||
void AzQtTraceLogger::WriteStartupLog(const AZStd::string& logFileName)
|
||||
{
|
||||
using namespace AzFramework;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace AzToolsFramework
|
||||
fileIO->CreatePath("@log@");
|
||||
|
||||
AZStd::string logPath;
|
||||
StringFunc::Path::Join(logDirectory.c_str(), name, logPath);
|
||||
StringFunc::Path::Join(logDirectory.c_str(), logFileName.c_str(), logPath);
|
||||
|
||||
m_logFile.reset(aznew LogFile(logPath.c_str()));
|
||||
if (m_logFile)
|
||||
|
||||
@@ -17,12 +17,15 @@
|
||||
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
// Connects and disconnects TraceMessageBus and allows for logging for O3DEToolsApplications
|
||||
class AzQtTraceLogger : public AZ::Debug::TraceMessageBus::Handler
|
||||
{
|
||||
public:
|
||||
AzQtTraceLogger();
|
||||
~AzQtTraceLogger();
|
||||
void WriteStartupLog(char name[]);
|
||||
|
||||
//! Intalize logging for O3DEToolsApplications
|
||||
void WriteStartupLog(const AZStd::string& logFileName);
|
||||
|
||||
protected:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -74,6 +74,8 @@ namespace MaterialEditor
|
||||
: Application(argc, argv)
|
||||
, AzQtApplication(*argc, *argv)
|
||||
{
|
||||
QApplication::setApplicationName("O3DE MaterialEditor");
|
||||
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddBuildSystemTargetSpecialization(
|
||||
*AZ::SettingsRegistry::Get(), GetBuildTargetName());
|
||||
|
||||
|
||||
+2
@@ -70,6 +70,8 @@ namespace ShaderManagementConsole
|
||||
: Application(argc, argv)
|
||||
, AzQtApplication(*argc, *argv)
|
||||
{
|
||||
QApplication::setApplicationName("O3DE ShaderManagementConsole");
|
||||
|
||||
// The settings registry has been created at this point, so add the CMake target
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddBuildSystemTargetSpecialization(
|
||||
*AZ::SettingsRegistry::Get(), GetBuildTargetName());
|
||||
|
||||
Reference in New Issue
Block a user