Merge branch 'staged' into dev

This commit is contained in:
YiFang Xiao 2023-09-17 11:20:59 +08:00
commit 76a2cd55a9
10 changed files with 17 additions and 42 deletions

View file

@ -30,12 +30,7 @@ jobs:
env:
targetName: GoldenDict
steps:
# - name: prepare env
# run: |
# cd /opt
# mkdir homebrew
# curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
# export PATH=$PATH:/opt/homebrew/bin
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:

View file

@ -30,13 +30,6 @@ jobs:
version-suffix: alpha
prerelease: true
steps:
# macos 11.0 默认环境变了,要指定
- name: prepare env
if: ${{ matrix.os == 'macos-11' }}
run: |
softwareupdate --all --install --force
sudo xcode-select --print-path
sudo xcode-select --switch /Library/Developer/CommandLineTools
- uses: actions/checkout@v3
with:
@ -227,7 +220,7 @@ jobs:
AppImage: Ubuntu-20.04
macOS: macOS-12 and macOS-13
Windows: Visual studio 2019
based on: ${{github.ref}}
based on: ${{github.ref_name}}

View file

@ -30,13 +30,6 @@ jobs:
version-suffix: alpha
prerelease: true
steps:
# macos 11.0 默认环境变了,要指定
- name: prepare env
if: ${{ matrix.os == 'macos-11' }}
run: |
softwareupdate --all --install --force
sudo xcode-select --print-path
sudo xcode-select --switch /Library/Developer/CommandLineTools
- uses: actions/checkout@v3
with:
@ -104,7 +97,7 @@ jobs:
- name: compile
run: |
qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=use_xapian
qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=use_xapian CONFIG+=no_ffmpeg_player
make -j8
- name: package
@ -136,7 +129,7 @@ jobs:
mkdir tmp
mv ${targetName}.app ./tmp
# --background "installer_background.png"
create-dmg --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/
create-dmg --hdiutil-verbose --volname "${targetName} Installer" --volicon "icons/macicon.icns" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "${targetName}.app" 200 190 --hide-extension "${targetName}.app" --app-drop-link 600 185 --skip-jenkins "${targetName}.dmg" tmp/
- name: changelog
id: changelog
run: |
@ -232,7 +225,7 @@ jobs:
AppImage: Ubuntu-20.04
macOS: macOS-12 and macOS-13
Windows: Visual studio 2019
based on: ${{github.ref}}
based on: ${{github.ref_name}}

View file

@ -202,7 +202,7 @@ jobs:
AppImage: Ubuntu-20.04
macOS: macOS-12 and macOS-13
Windows: Visual studio 2019
based on: ${{github.ref}}
based on: ${{github.ref_name}}
#### Changes

View file

@ -189,7 +189,7 @@ jobs:
AppImage: Ubuntu-20.04
macOS: macOS-12 and macOS-13
Windows: Visual studio 2019
based on: ${{github.ref}}
based on: ${{github.ref_name}}
#### Changes

View file

@ -262,7 +262,7 @@ jobs:
AppImage: Ubuntu-20.04
macOS: macOS-12 and macOS-13
Windows: Visual studio 2019
based on: ${{github.ref}}
based on: ${{github.ref_name}}
#### Changes

View file

@ -238,7 +238,7 @@ jobs:
AppImage: Ubuntu-20.04
macOS: macOS-12 and macOS-13
Windows: Visual studio 2019
based on: ${{github.ref}}
based on: ${{github.ref_name}}

View file

@ -59,8 +59,13 @@ void IframeSchemeHandler::requestStarted( QWebEngineUrlRequestJob * requestJob )
// Change links from relative to absolute
QString root = reply->url().scheme() + "://" + reply->url().host();
if ( reply->url().port() != 80 && reply->url().port() != 443 ) {
root = root + ":" + QString::number( reply->url().port() );
}
QString base = root + reply->url().path();
QRegularExpression baseTag( R"EOF(<base\s+href=["'](.*?)["'].*?>)EOF",
QRegularExpression::CaseInsensitiveOption
| QRegularExpression::DotMatchesEverythingOption );

View file

@ -126,7 +126,7 @@ ScanPopup::ScanPopup( QWidget * parent,
connect( ui.translateBox->translateLine(), &QLineEdit::textChanged, this, &ScanPopup::translateInputChanged );
connect( ui.translateBox->translateLine(), &QLineEdit::returnPressed, this, &ScanPopup::translateInputFinished );
connect( ui.translateBox, &TranslateBox::returnPressed, this, &ScanPopup::translateInputFinished );
ui.pronounceButton->setDisabled( true );
@ -191,17 +191,6 @@ ScanPopup::ScanPopup( QWidget * parent,
definition->focus();
#if 0 // Experimental code to give window a non-rectangular shape (i.e. \
// balloon) using a colorkey mask.
QPixmap pixMask( size() );
render( &pixMask );
setMask( pixMask.createMaskFromColor( QColor( 255, 0, 0 ) ) );
// This helps against flickering
setAttribute( Qt::WA_NoSystemBackground );
#endif
escapeAction.setShortcut( QKeySequence( "Esc" ) );
addAction( &escapeAction );
connect( &escapeAction, &QAction::triggered, this, &ScanPopup::escapePressed );

View file

@ -97,7 +97,7 @@ void TranslateBox::setSizePolicy( QSizePolicy policy )
void TranslateBox::setModel( QStringList & _words )
{
disconnect( completer, 0, translate_line, 0 );
auto model = (QStringListModel *)( completer->model() );
const auto model = static_cast< QStringListModel * >( completer->model() );
model->setStringList( _words );
@ -109,6 +109,7 @@ void TranslateBox::setModel( QStringList & _words )
[ & ]( const QString & text ) {
translate_line->setText( text );
emit returnPressed();
selectedItem = false;
} );
connect( completer,
QOverload< const QString & >::of( &QCompleter::highlighted ),
@ -120,7 +121,6 @@ void TranslateBox::setModel( QStringList & _words )
void TranslateBox::showPopup()
{
selectedItem = false;
if ( m_popupEnabled ) {
completer->popup()->show();
completer->complete();