WriteStartupLog() implemented in base class (unresolved external)

Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
This commit is contained in:
Dayo Lawal
2021-06-17 15:44:48 -05:00
committed by Dayo Lawal
parent ecede42501
commit f930185077
7 changed files with 19 additions and 8 deletions
@@ -34,7 +34,12 @@ namespace AzQtComponents
QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
// Must be set before QApplication is initialized, so that we support HighDpi monitors, like the Retina displays
}
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);
@@ -24,8 +24,9 @@ namespace AzQtComponents
{
public:
AzQtApplication(int& argc, char** argv);
void static setDpiScaling();
private:
protected:
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
AZStd::unique_ptr<AzQtTraceLogger> m_traceLogger;
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
@@ -40,7 +40,7 @@ namespace AzQtComponents
return false;
}
void AzQtTraceLogger::WriteStartupLog()
void AzQtTraceLogger::WriteStartupLog(char name[])
{
using namespace AzFramework;
@@ -61,7 +61,7 @@ namespace AzQtComponents
fileIO->CreatePath("@log@");
AZStd::string logPath;
StringFunc::Path::Join(logDirectory.c_str(), "MaterialEditor.log", logPath);
StringFunc::Path::Join(logDirectory.c_str(), name, logPath);
m_logFile.reset(aznew LogFile(logPath.c_str()));
if (m_logFile)
@@ -23,14 +23,14 @@ namespace AzQtComponents
AzQtTraceLogger();
~AzQtTraceLogger();
void WriteStartupLog(char name[]);
protected:
//////////////////////////////////////////////////////////////////////////
// AZ::Debug::TraceMessageBus::Handler overrides...
bool OnOutput(const char* window, const char* message) override;
//////////////////////////////////////////////////////////////////////////
void WriteStartupLog();
struct LogMessage
{
public:
@@ -40,6 +40,5 @@ namespace AzQtComponents
AZStd::vector<LogMessage> m_startupLogSink;
AZStd::unique_ptr<AzFramework::LogFile> m_logFile;
};
}
@@ -476,7 +476,7 @@ namespace MaterialEditor
return;
}
WriteStartupLog();
m_traceLogger->WriteStartupLog("MaterialEditor.log");
if (!LaunchDiscoveryService())
{
@@ -39,6 +39,8 @@
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <AzCore/Utils/Utils.h>
#include <AzQtComponents/Application/AzQtTraceLogger.h>
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
#include <QFileInfo>
#include <QObject>
@@ -15,6 +15,7 @@
#include <AzQtComponents/Utilities/QtPluginPaths.h>
#include <AzQtComponents/Utilities/HandleDpiAwareness.h>
#include <AzQtComponents/Components/WindowDecorationWrapper.h>
#include <AzQtComponents/Application/AzQtApplication.h>
#include <QtWidgets/QApplication>
#include <QtGui/private/qhighdpiscaling_p.h>
@@ -39,7 +40,10 @@ int main(int argc, char** argv)
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
AzQtComponents::Utilities::HandleDpiAwareness(AzQtComponents::Utilities::PerScreenDpiAware);
AzQtComponents::AzQtApplication::setDpiScaling();
ShaderManagementConsole::ShaderManagementConsoleApplication app(&argc, &argv);
AZ::IO::FixedMaxPath engineRootPath;
if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr)
{