mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-05 00:24:06 +00:00
Merge branch 'staged' into dev
This commit is contained in:
commit
76a2cd55a9
|
@ -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:
|
||||
|
|
|
@ -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}}
|
||||
|
||||
|
||||
|
||||
|
|
13
.github/workflows/macos-homebrew.yml
vendored
13
.github/workflows/macos-homebrew.yml
vendored
|
@ -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}}
|
||||
|
||||
|
||||
|
||||
|
|
2
.github/workflows/ubuntu-6.2.yml
vendored
2
.github/workflows/ubuntu-6.2.yml
vendored
|
@ -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
|
||||
|
||||
|
|
2
.github/workflows/ubuntu.yml
vendored
2
.github/workflows/ubuntu.yml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/windows-6.x.yml
vendored
2
.github/workflows/windows-6.x.yml
vendored
|
@ -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
|
||||
|
||||
|
|
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
@ -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}}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue