mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
clean: delete stub_msvc.h
This commit is contained in:
parent
112874b0e3
commit
8f6ef372be
|
@ -4,9 +4,6 @@
|
|||
#include <QStyle>
|
||||
#include <QMessageBox>
|
||||
#include <string>
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
#include <QBuffer>
|
||||
#include <QTextCodec>
|
||||
|
||||
|
@ -31,10 +28,9 @@ std::string c_string( const QString & str )
|
|||
return std::string( str.toUtf8().constData() );
|
||||
}
|
||||
|
||||
bool endsWithIgnoreCase( const string & str1, string str2 )
|
||||
bool endsWithIgnoreCase( QByteArrayView str, QByteArrayView extension )
|
||||
{
|
||||
return ( str1.size() >= (unsigned)str2.size() )
|
||||
&& ( strcasecmp( str1.c_str() + ( str1.size() - str2.size() ), str2.data() ) == 0 );
|
||||
return ( str.size() >= extension.size() ) && str.last( extension.size() ).compare( extension, Qt::CaseInsensitive );
|
||||
}
|
||||
|
||||
QString escapeAmps( QString const & str )
|
||||
|
|
|
@ -40,7 +40,7 @@ inline QString rstrip( const QString & str )
|
|||
}
|
||||
|
||||
std::string c_string( const QString & str );
|
||||
bool endsWithIgnoreCase( const string & str1, string str2 );
|
||||
bool endsWithIgnoreCase( QByteArrayView str, QByteArrayView extension );
|
||||
/**
|
||||
* remove punctuation , space, symbol
|
||||
*
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include <QString>
|
||||
#include <QSemaphore>
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
#include <string.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include <QAtomicInt>
|
||||
#include <QPainter>
|
||||
|
|
|
@ -23,10 +23,6 @@
|
|||
|
||||
#include <QRegularExpression>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
namespace DictdFiles {
|
||||
|
||||
using std::map;
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
#include <list>
|
||||
#include <wctype.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include <QSemaphore>
|
||||
#include <QThreadPool>
|
||||
#include <QAtomicInt>
|
||||
|
@ -1741,7 +1737,7 @@ vector< sptr< Dictionary::Class > > makeDictionaries( vector< string > const & f
|
|||
|
||||
int extSize = ( uncompressedDsl ? 4 : 7 );
|
||||
if ( fileName.size() - extSize >= 5
|
||||
&& strncasecmp( fileName.c_str() + fileName.size() - extSize - 5, "_abrv", 5 ) == 0 ) {
|
||||
&& qstrnicmp( fileName.c_str() + fileName.size() - extSize - 5, "_abrv", 5 ) == 0 ) {
|
||||
// It is, skip it
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -18,8 +18,12 @@
|
|||
#include <QString>
|
||||
#include <QtCore5Compat/QTextCodec>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
// POSIX symbol unavailable on Windows needed for eb headers
|
||||
#ifdef Q_OS_WIN
|
||||
#ifndef _SSIZE_T
|
||||
#define _SSIZE_T
|
||||
#define ssize_t long
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <eb/eb.h>
|
||||
|
|
|
@ -39,9 +39,6 @@
|
|||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
namespace Gls {
|
||||
|
||||
|
|
|
@ -14,10 +14,6 @@
|
|||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#define OV_EXCLUDE_STATIC_CALLBACKS
|
||||
#include <vorbis/vorbisfile.h>
|
||||
#include <QDir>
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include <map>
|
||||
#include <set>
|
||||
#include <list>
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include "globalregex.hh"
|
||||
#include "tiff.hh"
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "utils.hh"
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
namespace Sdict {
|
||||
|
||||
|
|
|
@ -17,10 +17,6 @@
|
|||
#include "tiff.hh"
|
||||
#include "utils.hh"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include "iconv.hh"
|
||||
|
||||
#include <QString>
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include <QString>
|
||||
#include <QSemaphore>
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
#include "tiff.hh"
|
||||
#include "ftshelpers.hh"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include <QIODevice>
|
||||
#include <QXmlStreamReader>
|
||||
|
|
|
@ -17,10 +17,6 @@
|
|||
#include "ftshelpers.hh"
|
||||
#include "htmlescape.hh"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QFile>
|
||||
#include <QString>
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
|
||||
#include "utils.hh"
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
#include <QLocale>
|
||||
#include <QRegularExpression>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stub_msvc.h>
|
||||
#endif
|
||||
// Language codes
|
||||
|
||||
QMap< QString, GDLangCode > LangCoder::LANG_CODE_MAP = {
|
||||
|
@ -231,10 +228,10 @@ QString LangCoder::intToCode2( quint32 val )
|
|||
|
||||
quint32 LangCoder::findIdForLanguage( gd::wstring const & lang )
|
||||
{
|
||||
const auto langFolded = Utf8::encode( lang );
|
||||
const auto langFolded = QByteArrayView( Utf8::encode( lang ) );
|
||||
|
||||
for ( auto const & lc : LANG_CODE_MAP ) {
|
||||
if ( strcasecmp( langFolded.c_str(), lc.lang.c_str() ) == 0 ) {
|
||||
if ( langFolded.compare( lc.lang, Qt::CaseInsensitive ) ) {
|
||||
return code2toInt( lc.code2.toStdString().c_str() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#ifdef _MSC_VER
|
||||
#if !defined(strcasecmp)
|
||||
# define strcasecmp _strcmpi
|
||||
#endif
|
||||
#if !defined(strncasecmp)
|
||||
# define strncasecmp _strnicmp
|
||||
#endif
|
||||
|
||||
#ifndef _SSIZE_T
|
||||
#define _SSIZE_T
|
||||
#define ssize_t long
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in a new issue