mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-28 07:54:06 +00:00
Merge branch 'staged' into dev
This commit is contained in:
commit
241e58dbe6
|
@ -430,6 +430,7 @@ ArticleRequest::ArticleRequest(
|
|||
memcpy( &data.front(), header.data(), header.size() );
|
||||
|
||||
// Accumulate main forms
|
||||
emit GlobalBroadcaster::instance()->dictionaryClear( ActiveDictIds{word} );
|
||||
|
||||
for( unsigned x = 0; x < activeDicts.size(); ++x )
|
||||
{
|
||||
|
@ -449,8 +450,6 @@ void ArticleRequest::altSearchFinished()
|
|||
if ( altsDone )
|
||||
return;
|
||||
|
||||
emit GlobalBroadcaster::instance()->dictionaryClear( ActiveDictIds{word} );
|
||||
|
||||
// Check every request for finishing
|
||||
for( list< sptr< Dictionary::WordSearchRequest > >::iterator i =
|
||||
altSearches.begin(); i != altSearches.end(); )
|
||||
|
|
|
@ -252,9 +252,9 @@ QNetworkReply * ArticleNetworkAccessManager::getArticleReply( QNetworkRequest co
|
|||
sptr< Dictionary::DataRequest > ArticleNetworkAccessManager::getResource(
|
||||
QUrl const & url, QString & contentType )
|
||||
{
|
||||
GD_DPRINTF( "getResource: %ls", url.toString().toStdWString().c_str() );
|
||||
GD_DPRINTF( "scheme: %ls", url.scheme().toStdWString().c_str() );
|
||||
GD_DPRINTF( "host: %ls", url.host().toStdWString().c_str() );
|
||||
qDebug() << "getResource:" << url.toString();
|
||||
qDebug() << "scheme:" << url.scheme();
|
||||
qDebug() << "host:" << url.host();
|
||||
|
||||
if ( url.scheme() == "gdlookup" )
|
||||
{
|
||||
|
|
|
@ -1668,7 +1668,6 @@ void ArticleView::playSound()
|
|||
});
|
||||
}
|
||||
|
||||
// use eventloop to turn the async callback to sync execution.
|
||||
void ArticleView::toHtml( const std::function< void( QString & ) > & callback )
|
||||
{
|
||||
ui.definition->page()->toHtml(
|
||||
|
@ -2079,7 +2078,7 @@ void ArticleView::resourceDownloadFinished()
|
|||
{
|
||||
if ( (*i)->isFinished() )
|
||||
{
|
||||
if ( (*i)->dataSize() >= 0 )
|
||||
if ( (*i)->dataSize() > 0 )
|
||||
{
|
||||
// Ok, got one finished, all others are irrelevant now
|
||||
|
||||
|
|
|
@ -667,5 +667,14 @@ TS_OUT = $$TRANSLATIONS
|
|||
TS_OUT ~= s/.ts/.qm/g
|
||||
PRE_TARGETDEPS += $$TS_OUT
|
||||
|
||||
equals(QT_VERSION,6.4.0){
|
||||
#QTBUG-105984
|
||||
multimedia.files = $$[QT_INSTALL_PLUGINS]/multimedia/*
|
||||
multimedia.path = plugins/multimedia
|
||||
#multimedia.CONFIG += no_check_exist
|
||||
message("copy qt6.4.0 multimedia")
|
||||
INSTALLS += multimedia
|
||||
}
|
||||
|
||||
include( thirdparty/qtsingleapplication/src/qtsingleapplication.pri )
|
||||
|
||||
|
|
14
scanpopup.cc
14
scanpopup.cc
|
@ -202,11 +202,17 @@ ScanPopup::ScanPopup( QWidget * parent,
|
|||
if( cfg.popupWindowAlwaysOnTop )
|
||||
flags |= Qt::WindowStaysOnTopHint;
|
||||
setWindowFlags( flags );
|
||||
#ifdef Q_OS_MACOS
|
||||
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
dictionaryBar.setMovable( false );
|
||||
setWindowFlags( unpinnedWindowFlags() );
|
||||
#ifdef Q_OS_MACOS
|
||||
setAttribute(Qt::WA_MacAlwaysShowToolWindow, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
connect( &configEvents, SIGNAL( mutedDictionariesChanged() ),
|
||||
|
@ -1070,6 +1076,10 @@ void ScanPopup::pinButtonClicked( bool checked )
|
|||
flags |= Qt::WindowStaysOnTopHint;
|
||||
setWindowFlags( flags );
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
|
||||
#endif
|
||||
|
||||
setWindowTitle( tr( "%1 - %2" ).arg( elideInputWord(), "GoldenDict" ) );
|
||||
dictionaryBar.setMovable( true );
|
||||
hideTimer.stop();
|
||||
|
@ -1080,6 +1090,10 @@ void ScanPopup::pinButtonClicked( bool checked )
|
|||
dictionaryBar.setMovable( false );
|
||||
setWindowFlags( unpinnedWindowFlags() );
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
setAttribute(Qt::WA_MacAlwaysShowToolWindow, false);
|
||||
#endif
|
||||
|
||||
mouseEnteredOnce = true;
|
||||
}
|
||||
cfg.pinPopupWindow = checked;
|
||||
|
|
Loading…
Reference in a new issue