Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Merge branch '1.17'
Browse files Browse the repository at this point in the history
  • Loading branch information
Feldrise committed Dec 23, 2018
2 parents ff81ee5 + 0101f03 commit 07ef758
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 4 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

if (WIN32)
set (SIELO_LIBS ${SIELO_LIBS} d3d9)
add_executable(sielo-browser WIN32 ${SOURCE_FILES} ic_sielo.rc)
elseif(APPLE)
add_executable(sielo-browser MACOSX_BUNDLE ${SOURCE_FILES} ${ICON_PATH})
Expand Down
4 changes: 2 additions & 2 deletions Core/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

namespace Sn
{
QString Application::currentVersion = QString("1.17.10");
QString Application::currentVersion = QString("1.17.11");

// Static member
Application *Application::instance()
Expand Down Expand Up @@ -224,7 +224,7 @@ Application::Application(int& argc, char** argv) :
{
// Setting up settings environment
QCoreApplication::setApplicationName(QLatin1String("Sielo"));
QCoreApplication::setApplicationVersion(QLatin1String("1.17.10"));
QCoreApplication::setApplicationVersion(QLatin1String("1.17.11"));

setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
setAttribute(Qt::AA_EnableHighDpiScaling);
Expand Down
7 changes: 7 additions & 0 deletions Core/Widgets/Preferences/Appearance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,13 @@ void AppearancePage::setupUI()
m_advancedPageLayout->addLayout(m_blurFilterLayout);
m_advancedPageLayout->addItem(m_spacer);

#ifdef Q_OS_WIN
if (QCoreApplication::testAttribute(Qt::AA_UseSoftwareOpenGL)) {
m_oldChipsetInfoLabel = new QLabel(tr("You are using an old chipset that doesn't have a correct OpenGL port. To improve user experience, the hardware acceleration is disabled."), this);
m_advancedPageLayout->addWidget(m_oldChipsetInfoLabel);
}
#endif

m_tabs->addTab(m_themePage, tr("Themes"));
m_tabs->addTab(m_advancedPage, tr("Advanced"));

Expand Down
3 changes: 3 additions & 0 deletions Core/Widgets/Preferences/Appearance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ private slots:
QLabel* m_backgroundLabel{nullptr};
QLineEdit* m_backgroundLocationEdit{nullptr};
QPushButton* m_backgroundLocationButton{nullptr};
#ifdef Q_OS_WIN
QLabel* m_oldChipsetInfoLabel{nullptr};
#endif
QSpacerItem* m_spacer{nullptr};

bool m_colorsChanged{false};
Expand Down
2 changes: 1 addition & 1 deletion Core/Widgets/Preferences/GeneralPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void GeneralPage::setupUIObjects()
m_layoutProfileControl = new QHBoxLayout(m_profileControlFrame);

m_descCantDeleteActiveProfile = new QLabel(tr("Note: You cannot delete active profile."), m_profileControlFrame);
m_descCantDeleteActiveProfile->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
m_descCantDeleteActiveProfile->setAlignment(/*Qt::AlignRight | Qt::AlignTrailing | */Qt::AlignVCenter);

m_btnCreateNewProfile = new QPushButton(tr("Create New"), m_profileControlFrame);
m_btnDeleteProfile = new QPushButton(tr("Delete"), m_profileControlFrame);
Expand Down
37 changes: 37 additions & 0 deletions Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,49 @@

#include "Core/BrowserWindow.hpp"

#ifdef Q_OS_WIN
#include <d3d9.h>
#endif

int main(int argc, char** argv)
{
qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "9000");
qputenv("QT_XCB_FORCE_SOFTWARE_OPENGL", "1");
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");

#ifdef Q_OS_WIN
// Dirty but quick fix for Old Intel HD Graphic Card
if (QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS10) {
IDirect3D9* ctx = Direct3DCreate9(D3D_SDK_VERSION);

if (ctx != nullptr) {
D3DADAPTER_IDENTIFIER9 id;
if (ctx->GetAdapterIdentifier(D3DADAPTER_DEFAULT, 0, &id) == D3D_OK) {
const QString DeviceDescription( id.Description );
const QString FindedDeviceName = "Intel(R) HD Graphics";
QString DeviceVersion = "";

if (DeviceDescription.length() > FindedDeviceName.length()) {
bool cool = true;
int i = 0;
while (i < FindedDeviceName.length()) {
if (DeviceDescription[i] != FindedDeviceName[i]) cool = false;
i++;
}
i++;
for (int j = i; j < DeviceDescription.length(); j++) {
DeviceVersion += DeviceDescription[j];
}

if (DeviceVersion.toInt() > 900 && DeviceVersion.toInt() < 5000) {
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
}
}
}
}
}
#endif

Sn::Application app(argc, argv);

if (app.isClosing())
Expand Down
Binary file removed cloc-1.72.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion user-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#-------------------------------------------------------#
# macOS #
#-------------------------------------------------------#
set (CMAKE_PREFIX_PATH "/Users/feldrise/Qt/5.11.2/clang_64/") # <Set Path to Qt>
# set (CMAKE_PREFIX_PATH "/Users/feldrise/Qt/5.11.2/clang_64/") # <Set Path to Qt>
# set (OPENSSL_DIR "path to openssl") # <OTIONAL : Set the past to custom OpenSSL version>

#-------------------------------------------------------#
Expand Down

0 comments on commit 07ef758

Please sign in to comment.