Minor performance cleanup.

This commit is contained in:
Jim Evins
2018-02-11 15:51:30 -05:00
parent 931294a0f9
commit 6e6a1fab72
4 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -307,7 +307,7 @@ namespace glabels
if ( index != 0 ) if ( index != 0 )
{ {
mColorNode.setField( true ); mColorNode.setField( true );
mColorNode.setColor( QColor("#eeeeec") ); mColorNode.setColor( QColor( 0xee, 0xee, 0xec ) );
mColorNode.setKey( mKeys[index-1] ); mColorNode.setKey( mKeys[index-1] );
emit colorChanged( mColorNode, false ); emit colorChanged( mColorNode, false );
+1 -1
View File
@@ -191,7 +191,7 @@ namespace glabels
QString fileName = model::FileUtil::addExtension( rawFileName, ".glabels" ); QString fileName = model::FileUtil::addExtension( rawFileName, ".glabels" );
if ( QFileInfo(fileName).exists() ) if ( QFileInfo::exists(fileName) )
{ {
QMessageBox msgBox( window ); QMessageBox msgBox( window );
msgBox.setWindowTitle( tr("Save Label As") ); msgBox.setWindowTitle( tr("Save Label As") );
+2 -4
View File
@@ -109,8 +109,7 @@ namespace glabels
const model::Vendor* vendor = model::Db::lookupVendorFromName( tmplate->brand() ); const model::Vendor* vendor = model::Db::lookupVendorFromName( tmplate->brand() );
if ( (vendor != nullptr) && (vendor->url() != nullptr) ) if ( (vendor != nullptr) && (vendor->url() != nullptr) )
{ {
QString markup = QString( "<a href='%1'>%2</a>" ) QString markup = QString( "<a href='%1'>%2</a>" ).arg( vendor->url(), vendor->name() );
.arg( vendor->url() ).arg( vendor->name() );
vendorLabel->setText( markup ); vendorLabel->setText( markup );
} }
else else
@@ -120,8 +119,7 @@ namespace glabels
if ( tmplate->productUrl() != nullptr ) if ( tmplate->productUrl() != nullptr )
{ {
QString markup = QString( "<a href='%1'>%2</a>" ) QString markup = QString( "<a href='%1'>%2</a>" ).arg( tmplate->productUrl(), tmplate->part() );
.arg( tmplate->productUrl() ).arg( tmplate->part() );
partLabel->setText( markup ); partLabel->setText( markup );
} }
else else
+2 -2
View File
@@ -1709,12 +1709,12 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../glabels/PropertiesView.cpp" line="193"/> <location filename="../glabels/PropertiesView.cpp" line="191"/>
<source>Product Rotate</source> <source>Product Rotate</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../glabels/PropertiesView.cpp" line="222"/> <location filename="../glabels/PropertiesView.cpp" line="220"/>
<source>Change Product</source> <source>Change Product</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>