From 0ce1ff856639da95cba538a7a2e6ab39218f9f3a Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Wed, 5 Oct 2022 23:57:53 +0800 Subject: [PATCH 1/3] add undocumented date variable to VERSION --- goldendict.pro | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/goldendict.pro b/goldendict.pro index ec6317b1..43a26419 100644 --- a/goldendict.pro +++ b/goldendict.pro @@ -13,15 +13,7 @@ system(git describe --tags --always --dirty): hasGit=1 GIT_HASH=$$system(git rev-parse --short=8 HEAD ) } -win32{ -# date /T output is locale aware. - DATE=$$system(date /T) -} -else{ - DATE=$$system(date '+%Y/%m/%d') -} - -system(echo $${VERSION}.$${GIT_HASH} on $${DATE} > version.txt) +system(echo $${VERSION}.$${GIT_HASH} on $${_DATE_} > version.txt) !CONFIG( verbose_build_output ) { !win32|*-msvc* { From 2c9fdd522749bdbc1cb19eb3ddc022c205fd8258 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Thu, 6 Oct 2022 11:27:47 +0800 Subject: [PATCH 2/3] gico icon size change from 16x16 to 64x64 --- article_netmgr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/article_netmgr.cc b/article_netmgr.cc index e0e23650..f0f00119 100644 --- a/article_netmgr.cc +++ b/article_netmgr.cc @@ -335,7 +335,7 @@ sptr< Dictionary::DataRequest > ArticleNetworkAccessManager::getResource( QByteArray bytes; QBuffer buffer(&bytes); buffer.open(QIODevice::WriteOnly); - dictionaries[ x ]->getIcon().pixmap( 16 ).save(&buffer, "PNG"); + dictionaries[ x ]->getIcon().pixmap( 64 ).save(&buffer, "webp"); buffer.close(); sptr< Dictionary::DataRequestInstant > ico = new Dictionary::DataRequestInstant( true ); ico->getData().resize( bytes.size() ); From 33c631e4e543ba716822fdb39f14cfa8398bfb36 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Fri, 7 Oct 2022 17:39:43 +0800 Subject: [PATCH 3/3] opt: initialize variable in the constructor --- headwordsmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headwordsmodel.cpp b/headwordsmodel.cpp index b486fb30..818a10c5 100644 --- a/headwordsmodel.cpp +++ b/headwordsmodel.cpp @@ -2,7 +2,7 @@ #include "wstring_qt.hh" HeadwordListModel::HeadwordListModel( QObject * parent ) : - QAbstractListModel( parent ), filtering( false ), index( 0 ), ptr( 0 ) + QAbstractListModel( parent ), filtering( false ), totalSize(0), index( 0 ),ptr( 0 ) { }