Compare commits

..

5 commits

Author SHA1 Message Date
autofix-ci[bot] 88a54b0bbf
[autofix.ci] apply automated fixes 2024-11-20 10:18:45 +00:00
shenleban tongying 6f95e19881 merge if decl 2024-11-20 05:17:13 -05:00
shenleban tongying 0999f386d2 merge if 2024-11-20 05:02:04 -05:00
shenleban tongying d4d3e443b1 s 2024-11-20 04:49:23 -05:00
shenleban tongying 8f6ef372be clean: delete stub_msvc.h 2024-11-20 04:36:02 -05:00
4 changed files with 6 additions and 14 deletions

View file

@ -4,7 +4,6 @@
#include <QStyle>
#include <QMessageBox>
#include <string>
#include <QBuffer>
#include <QTextCodec>
@ -31,7 +30,7 @@ std::string c_string( const QString & str )
bool endsWithIgnoreCase( QByteArrayView str, QByteArrayView extension )
{
return ( str.size() > extension.size()) && str.last( extension.size() ).compare( extension, Qt::CaseInsensitive ) );
return ( str.size() >= extension.size() ) && str.last( extension.size() ).compare( extension, Qt::CaseInsensitive );
}
QString escapeAmps( QString const & str )

View file

@ -1733,18 +1733,13 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f
continue;
}
// Make sure it's not an abbreviation file
// Make sure it's not an abbreviation file. extSize of ".dsl" or ".dsl.dz"
int extSize = ( uncompressedDsl ? 4 : 7 );
if ( fileName.size() - extSize >= 5 ) {
auto fileName_without_extension = QByteArrayView( fileName ).chopped( extSize );
if ( fileName_without_extension.endsWith( "_abrv" ) ) {
if ( int extSize = ( uncompressedDsl ? 4 : 7 ); ( fileName.size() >= ( 5 + extSize ) )
&& QByteArrayView( fileName ).chopped( extSize ).last( 5 ).compare( "_abrv", Qt::CaseInsensitive ) ) {
// It is, skip it
continue;
}
}
unsigned atLine = 0; // Indicates current line in .dsl, for debug purposes

View file

@ -1,6 +1,5 @@
#pragma once
#include "dict/dictionary.hh"
#include "ex.hh"

View file

@ -9,7 +9,6 @@
#include <QLocale>
#include <QRegularExpression>
// Language codes
QMap< QString, GDLangCode > LangCoder::LANG_CODE_MAP = {