diff --git a/common/lc_library.cpp b/common/lc_library.cpp index 2c943091..a5dbf788 100644 --- a/common/lc_library.cpp +++ b/common/lc_library.cpp @@ -1581,28 +1581,28 @@ void lcPiecesLibrary::SetStudLogo(int StudLogo, bool Reload) bool lcPiecesLibrary::GetStudLogoFile(lcMemFile& PrimFile, int StudLogo, bool OpenStud) { - // validate logo choice and unofficial lib available if (!StudLogo || (!mZipFiles[LC_ZIPFILE_UNOFFICIAL] && !mHasUnofficial)) return false; - // construct logo reference line QString Logo = QString("%1").arg(StudLogo); QString LogoRefLine = QString("1 16 0 0 0 1 0 0 0 1 0 0 0 1 "); LogoRefLine += (OpenStud ? QString("stud2-logo%1.dat").arg(StudLogo > 1 ? Logo : ""): QString("stud-logo%1.dat").arg(StudLogo > 1 ? Logo : "")); - // construct primitive file + const QLatin1String LineEnding("\r\n"); QByteArray FileData; - QTextStream out(&FileData); - out << (OpenStud ? "0 Stud Open" : "0 Stud") << endl; - out << (OpenStud ? "0 Name: stud2.dat" : "0 Name: stud.dat") << endl; - out << "0 Author: James Jessiman" << endl; - out << "0 !LDRAW_ORG Primitive" << endl; - out << "0 BFC CERTIFY CCW" << endl; - out << LogoRefLine << endl; + QTextStream TextStream(&FileData); + + TextStream << (OpenStud ? "0 Stud Open" : "0 Stud") << LineEnding; + TextStream << (OpenStud ? "0 Name: stud2.dat" : "0 Name: stud.dat") << LineEnding; + TextStream << "0 Author: James Jessiman" << LineEnding; + TextStream << "0 !LDRAW_ORG Primitive" << LineEnding; + TextStream << "0 BFC CERTIFY CCW" << LineEnding; + TextStream << LogoRefLine << LineEnding; PrimFile.WriteBuffer(FileData.constData(), size_t(FileData.size())); PrimFile.Seek(0, SEEK_SET); + return true; } diff --git a/common/lc_mainwindow.cpp b/common/lc_mainwindow.cpp index 6eaf9827..a106a58b 100644 --- a/common/lc_mainwindow.cpp +++ b/common/lc_mainwindow.cpp @@ -790,7 +790,7 @@ void lcMainWindow::CreatePreviewWidget() mPreviewWidget = new lcPreviewDockWidget(); mPreviewToolBar = new QDockWidget(tr("Preview"), this); - mPreviewToolBar->setWindowTitle(trUtf8("Preview")); + mPreviewToolBar->setWindowTitle(tr("Preview")); mPreviewToolBar->setObjectName("PreviewToolBarw"); mPreviewToolBar->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); mPreviewToolBar->setWidget(mPreviewWidget); diff --git a/qt/lc_qminifigdialog.ui b/qt/lc_qminifigdialog.ui index 25819793..e8cd4f97 100644 --- a/qt/lc_qminifigdialog.ui +++ b/qt/lc_qminifigdialog.ui @@ -26,7 +26,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -110,7 +110,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -126,7 +126,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -168,7 +168,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -198,7 +198,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -214,7 +214,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -282,7 +282,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -298,7 +298,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -366,7 +366,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -382,7 +382,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -450,7 +450,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -466,7 +466,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -496,7 +496,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -512,7 +512,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -580,7 +580,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -596,7 +596,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24 @@ -664,7 +664,7 @@ - QComboBox::AdjustToMinimumContentsLength + QComboBox::AdjustToContents 24