Integrating latest from github/staging

Integrating up through commit 5e1bdae
This commit is contained in:
alexpete
2021-03-26 14:31:50 -07:00
parent 9c54341af8
commit 36c4e827bd
764 changed files with 11453 additions and 20251 deletions
@@ -11,6 +11,7 @@
*/
#include <AzCore/PlatformDef.h>
#include <AzCore/IO/Path/Path.h>
#include "NewsBuilder.h"
#include "Qt/ArticleDetails.h"
#include "Qt/BuilderArticleViewContainer.h"
@@ -39,8 +40,7 @@ AZ_POP_DISABLE_WARNING
namespace News
{
NewsBuilder::NewsBuilder(QWidget* parent)
NewsBuilder::NewsBuilder(QWidget* parent, const AZ::IO::PathView& engineRootPath)
: QMainWindow(parent)
, m_ui(new Ui::NewsBuilderClass())
, m_manifest(new BuilderResourceManifest(
@@ -51,15 +51,16 @@ namespace News
, m_articleViewContainer(new BuilderArticleViewContainer(this, *m_manifest))
, m_logContainer(new LogContainer(this))
{
AzQtComponents::StyleManager* m_styleSheet = new AzQtComponents::StyleManager(this);
m_styleSheet->initialize(qApp);
m_styleSheet->initialize(qApp, engineRootPath);
m_ui->setupUi(this);
QDir rootDir(AzQtComponents::FindEngineRootDir(qApp));
QDir rootDir = QString::fromUtf8(engineRootPath.Native().data(), aznumeric_cast<int>(engineRootPath.Native().size()));
const auto pathOnDisk = rootDir.absoluteFilePath("Code/Tools/News/NewsBuilder/Resources");
const auto qrcPath = QStringLiteral(":/NewsBuilder");
AzQtComponents::StyleManager::addSearchPaths("newsbuilder", pathOnDisk, qrcPath);
AzQtComponents::StyleManager::addSearchPaths("newsbuilder", pathOnDisk, qrcPath, engineRootPath);
AzQtComponents::StyleManager::setStyleSheet(this, QStringLiteral("newsbuilder:NewsBuilder.qss"));
+3 -1
View File
@@ -17,6 +17,8 @@
#include "NewsShared/LogType.h"
#include "NewsShared/ErrorCodes.h"
#include <AzCore/IO/Path/Path_fwd.h>
#endif
class QSignalMapper;
@@ -41,7 +43,7 @@ namespace News
Q_OBJECT
public:
explicit NewsBuilder(QWidget* parent = nullptr);
explicit NewsBuilder(QWidget* parent, const AZ::IO::PathView& engineRootPath);
~NewsBuilder();
private:
+10 -3
View File
@@ -15,19 +15,26 @@
#include "Qt/NewsBuilder.h"
#include <AzCore/base.h>
#include <AzCore/Component/ComponentApplication.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <AzCore/IO/Path/Path.h>
int main(int argc, char *argv[])
{
// 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);
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
QApplication a(argc, argv);
News::NewsBuilder w;
AZ::IO::FixedMaxPath engineRootPath;
{
AZ::ComponentApplication componentApplication;
auto settingsRegistry = AZ::SettingsRegistry::Get();
settingsRegistry->Get(engineRootPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder);
}
News::NewsBuilder w(nullptr, engineRootPath);
w.show();
return a.exec();
}