mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 16:54:08 +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() );
|
memcpy( &data.front(), header.data(), header.size() );
|
||||||
|
|
||||||
// Accumulate main forms
|
// Accumulate main forms
|
||||||
|
emit GlobalBroadcaster::instance()->dictionaryClear( ActiveDictIds{word} );
|
||||||
|
|
||||||
for( unsigned x = 0; x < activeDicts.size(); ++x )
|
for( unsigned x = 0; x < activeDicts.size(); ++x )
|
||||||
{
|
{
|
||||||
|
@ -449,8 +450,6 @@ void ArticleRequest::altSearchFinished()
|
||||||
if ( altsDone )
|
if ( altsDone )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
emit GlobalBroadcaster::instance()->dictionaryClear( ActiveDictIds{word} );
|
|
||||||
|
|
||||||
// Check every request for finishing
|
// Check every request for finishing
|
||||||
for( list< sptr< Dictionary::WordSearchRequest > >::iterator i =
|
for( list< sptr< Dictionary::WordSearchRequest > >::iterator i =
|
||||||
altSearches.begin(); i != altSearches.end(); )
|
altSearches.begin(); i != altSearches.end(); )
|
||||||
|
|
|
@ -252,9 +252,9 @@ QNetworkReply * ArticleNetworkAccessManager::getArticleReply( QNetworkRequest co
|
||||||
sptr< Dictionary::DataRequest > ArticleNetworkAccessManager::getResource(
|
sptr< Dictionary::DataRequest > ArticleNetworkAccessManager::getResource(
|
||||||
QUrl const & url, QString & contentType )
|
QUrl const & url, QString & contentType )
|
||||||
{
|
{
|
||||||
GD_DPRINTF( "getResource: %ls", url.toString().toStdWString().c_str() );
|
qDebug() << "getResource:" << url.toString();
|
||||||
GD_DPRINTF( "scheme: %ls", url.scheme().toStdWString().c_str() );
|
qDebug() << "scheme:" << url.scheme();
|
||||||
GD_DPRINTF( "host: %ls", url.host().toStdWString().c_str() );
|
qDebug() << "host:" << url.host();
|
||||||
|
|
||||||
if ( url.scheme() == "gdlookup" )
|
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 )
|
void ArticleView::toHtml( const std::function< void( QString & ) > & callback )
|
||||||
{
|
{
|
||||||
ui.definition->page()->toHtml(
|
ui.definition->page()->toHtml(
|
||||||
|
@ -2079,7 +2078,7 @@ void ArticleView::resourceDownloadFinished()
|
||||||
{
|
{
|
||||||
if ( (*i)->isFinished() )
|
if ( (*i)->isFinished() )
|
||||||
{
|
{
|
||||||
if ( (*i)->dataSize() >= 0 )
|
if ( (*i)->dataSize() > 0 )
|
||||||
{
|
{
|
||||||
// Ok, got one finished, all others are irrelevant now
|
// Ok, got one finished, all others are irrelevant now
|
||||||
|
|
||||||
|
|
|
@ -667,5 +667,14 @@ TS_OUT = $$TRANSLATIONS
|
||||||
TS_OUT ~= s/.ts/.qm/g
|
TS_OUT ~= s/.ts/.qm/g
|
||||||
PRE_TARGETDEPS += $$TS_OUT
|
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 )
|
include( thirdparty/qtsingleapplication/src/qtsingleapplication.pri )
|
||||||
|
|
||||||
|
|
14
scanpopup.cc
14
scanpopup.cc
|
@ -202,11 +202,17 @@ ScanPopup::ScanPopup( QWidget * parent,
|
||||||
if( cfg.popupWindowAlwaysOnTop )
|
if( cfg.popupWindowAlwaysOnTop )
|
||||||
flags |= Qt::WindowStaysOnTopHint;
|
flags |= Qt::WindowStaysOnTopHint;
|
||||||
setWindowFlags( flags );
|
setWindowFlags( flags );
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dictionaryBar.setMovable( false );
|
dictionaryBar.setMovable( false );
|
||||||
setWindowFlags( unpinnedWindowFlags() );
|
setWindowFlags( unpinnedWindowFlags() );
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
setAttribute(Qt::WA_MacAlwaysShowToolWindow, false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
connect( &configEvents, SIGNAL( mutedDictionariesChanged() ),
|
connect( &configEvents, SIGNAL( mutedDictionariesChanged() ),
|
||||||
|
@ -1070,6 +1076,10 @@ void ScanPopup::pinButtonClicked( bool checked )
|
||||||
flags |= Qt::WindowStaysOnTopHint;
|
flags |= Qt::WindowStaysOnTopHint;
|
||||||
setWindowFlags( flags );
|
setWindowFlags( flags );
|
||||||
|
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
|
||||||
|
#endif
|
||||||
|
|
||||||
setWindowTitle( tr( "%1 - %2" ).arg( elideInputWord(), "GoldenDict" ) );
|
setWindowTitle( tr( "%1 - %2" ).arg( elideInputWord(), "GoldenDict" ) );
|
||||||
dictionaryBar.setMovable( true );
|
dictionaryBar.setMovable( true );
|
||||||
hideTimer.stop();
|
hideTimer.stop();
|
||||||
|
@ -1080,6 +1090,10 @@ void ScanPopup::pinButtonClicked( bool checked )
|
||||||
dictionaryBar.setMovable( false );
|
dictionaryBar.setMovable( false );
|
||||||
setWindowFlags( unpinnedWindowFlags() );
|
setWindowFlags( unpinnedWindowFlags() );
|
||||||
|
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
setAttribute(Qt::WA_MacAlwaysShowToolWindow, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
mouseEnteredOnce = true;
|
mouseEnteredOnce = true;
|
||||||
}
|
}
|
||||||
cfg.pinPopupWindow = checked;
|
cfg.pinPopupWindow = checked;
|
||||||
|
|
Loading…
Reference in a new issue