Changed: Make QString from UTF-8 string

--HG--
branch : develop
This commit is contained in:
kervala 2015-12-06 19:43:01 +01:00
parent 926af19e1a
commit 9d3de84c38
3 changed files with 12 additions and 14 deletions

View file

@ -25,9 +25,9 @@ CSysInfoD3DWidget::CSysInfoD3DWidget( QWidget *parent ) :
setupUi( this ); setupUi( this );
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
descriptionLabel->setText( CSystem::GetInstance().d3dInfo.device.c_str() ); descriptionLabel->setText(QString::fromUtf8(CSystem::GetInstance().d3dInfo.device.c_str()));
driverLabel->setText( CSystem::GetInstance().d3dInfo.driver.c_str() ); driverLabel->setText(QString::fromUtf8(CSystem::GetInstance().d3dInfo.driver.c_str()));
versionLabel->setText( CSystem::GetInstance().d3dInfo.driverVersion.c_str() ); versionLabel->setText(QString::fromUtf8(CSystem::GetInstance().d3dInfo.driverVersion.c_str()));
#endif #endif
} }

View file

@ -23,11 +23,10 @@ CSysInfoOpenGLWidget::CSysInfoOpenGLWidget( QWidget *parent ) :
QWidget( parent ) QWidget( parent )
{ {
setupUi( this ); setupUi( this );
vendorLabel->setText( CSystem::GetInstance().openglInfo.vendor.c_str() ); vendorLabel->setText(QString::fromUtf8(CSystem::GetInstance().openglInfo.vendor.c_str()));
rendererLabel->setText( CSystem::GetInstance().openglInfo.renderer.c_str() ); rendererLabel->setText(QString::fromUtf8( CSystem::GetInstance().openglInfo.renderer.c_str()));
versionLabel->setText( CSystem::GetInstance().openglInfo.driverVersion.c_str() ); versionLabel->setText(QString::fromUtf8( CSystem::GetInstance().openglInfo.driverVersion.c_str()));
extensionsBox->setPlainText( CSystem::GetInstance().openglInfo.extensions.c_str() ); extensionsBox->setPlainText(QString::fromUtf8( CSystem::GetInstance().openglInfo.extensions.c_str()));
} }
CSysInfoOpenGLWidget::~CSysInfoOpenGLWidget() CSysInfoOpenGLWidget::~CSysInfoOpenGLWidget()

View file

@ -24,14 +24,13 @@ CSysInfoWidget::CSysInfoWidget( QWidget *parent ) :
{ {
setupUi( this ); setupUi( this );
osLabel->setText( CSystem::GetInstance().sysInfo.osName.c_str() ); osLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.osName.c_str()));
cpuLabel->setText( CSystem::GetInstance().sysInfo.cpuName.c_str() ); cpuLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.cpuName.c_str()));
ramLabel->setText( ramLabel->setText(QString(tr("%1 MB").arg(CSystem::GetInstance().sysInfo.totalRAM)));
QString().setNum( CSystem::GetInstance().sysInfo.totalRAM ).append( " Mb" ) );
gfxcardLabel->setText( CSystem::GetInstance().sysInfo.videoDevice.c_str() ); gfxcardLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.videoDevice.c_str()));
gfxdriverLabel->setText( CSystem::GetInstance().sysInfo.videoDriverVersion.c_str() ); gfxdriverLabel->setText(QString::fromUtf8(CSystem::GetInstance().sysInfo.videoDriverVersion.c_str()));
} }
CSysInfoWidget::~CSysInfoWidget() CSysInfoWidget::~CSysInfoWidget()