diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 10:45:59 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 10:45:59 +0900 |
commit | 046aece77e373b5280b56bf871fa6e974d06e85d (patch) | |
tree | 629c4681a5158d26512b815623754b33165d8d23 /qtools | |
parent | cccf3a7c7888ce7bd7a8f8d48a34c5474ad9feeb (diff) | |
download | doxygen-046aece77e373b5280b56bf871fa6e974d06e85d.tar.gz doxygen-046aece77e373b5280b56bf871fa6e974d06e85d.tar.bz2 doxygen-046aece77e373b5280b56bf871fa6e974d06e85d.zip |
Imported Upstream version 1.8.3upstream/1.8.3
Diffstat (limited to 'qtools')
-rw-r--r-- | qtools/Doxyfile | 17 | ||||
-rw-r--r-- | qtools/Makefile | 50 | ||||
-rw-r--r-- | qtools/qarray.h | 12 | ||||
-rw-r--r-- | qtools/qbuffer.cpp | 2 | ||||
-rw-r--r-- | qtools/qdatastream.cpp | 2 | ||||
-rw-r--r-- | qtools/qdir.cpp | 2 | ||||
-rw-r--r-- | qtools/qfile_unix.cpp | 12 | ||||
-rw-r--r-- | qtools/qfileinfo_unix.cpp | 6 | ||||
-rw-r--r-- | qtools/qregexp.cpp | 10 | ||||
-rw-r--r-- | qtools/qstring.cpp | 8 | ||||
-rw-r--r-- | qtools/qtextcodec.cpp | 8 | ||||
-rw-r--r-- | qtools/qtextstream.cpp | 8 | ||||
-rw-r--r-- | qtools/qthread_unix.cpp | 15 | ||||
-rw-r--r-- | qtools/qtools.pro | 107 | ||||
-rw-r--r-- | qtools/qutfcodec.cpp | 8 | ||||
-rw-r--r-- | qtools/qutfcodec.h | 2 |
16 files changed, 67 insertions, 202 deletions
diff --git a/qtools/Doxyfile b/qtools/Doxyfile index 8d3aff7..8aa5e83 100644 --- a/qtools/Doxyfile +++ b/qtools/Doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.0 +# Doxyfile 1.8.3 #--------------------------------------------------------------------------- # Project related configuration options @@ -34,6 +34,7 @@ OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES +AUTOLINK_SUPPORT = YES BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO @@ -114,6 +115,7 @@ INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- @@ -140,12 +142,14 @@ HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = HTML_COLORSTYLE_HUE = 220 HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = YES HTML_DYNAMIC_SECTIONS = YES +HTML_INDEX_NUM_ENTRIES = 100 GENERATE_DOCSET = YES DOCSET_FEEDNAME = "Doxygen generated docs" DOCSET_BUNDLE_ID = org.doxygen.Project @@ -176,10 +180,15 @@ EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest MATHJAX_EXTENSIONS = SEARCHENGINE = YES SERVER_BASED_SEARCH = YES +EXTERNAL_SEARCH = YES +SEARCHENGINE_URL = http://macbookpro/~dimitri/doxysearch.cgi +SEARCHDATA_FILE = searchdata.xml +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- @@ -217,7 +226,7 @@ MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- -GENERATE_XML = NO +GENERATE_XML = YES XML_OUTPUT = xml XML_SCHEMA = XML_DTD = @@ -256,10 +265,10 @@ PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES +CLASS_DIAGRAMS = NO MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES +HAVE_DOT = NO DOT_NUM_THREADS = 0 DOT_FONTNAME = DOT_FONTSIZE = 10 diff --git a/qtools/Makefile b/qtools/Makefile deleted file mode 100644 index a64bfb6..0000000 --- a/qtools/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# -# This file was generated from Makefile.in on Sat Aug 11 14:29:47 CEST 2012 -# - -DOXYGEN = /Users/dimitri/doxygen -TMAKEPATH = /Users/dimitri/doxygen/tmake/lib/macosx-c++ -ENV = env TMAKEPATH=$(TMAKEPATH) -TMAKE = /Users/dimitri/doxygen/tmake/bin/tmake -MAKE = /opt/local/bin/gmake -PERL = /opt/local/bin/perl -RM = rm -f -CP = cp -VERSION = 1.8.1.2 -INSTALL = /usr/local -INSTTOOL = /opt/local/bin/ginstall -DOXYDOCS = .. -DOCDIR = $(INSTALL)/share/doc/packages/doxygen -QTDIR = /usr -HAVE_DOT = /usr/local/bin/dot -MKSPECS = -spec macx-g++ -# -# -# -# Copyright (C) 1997-2000 by Dimitri van Heesch. -# -# Permission to use, copy, modify, and distribute this software and its -# documentation under the terms of the GNU General Public License is hereby -# granted. No representations are made about the suitability of this software -# for any purpose. It is provided "as is" without express or implied warranty. -# See the GNU General Public License for more details. -# -# Documents produced by Doxygen are derivative works derived from the -# input used in their production; they are not affected by this license. -# - -all: Makefile.qtools Makefile - $(MAKE) -f Makefile.qtools $@ - -Makefile.qtools: qtools.pro - $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools - -tmake: - $(ENV) $(PERL) $(TMAKE) qtools.pro >Makefile.qtools - -clean: Makefile.qtools - $(MAKE) -f Makefile.qtools clean - -distclean: clean - -FORCE: diff --git a/qtools/qarray.h b/qtools/qarray.h index 90dcbb7..3d67fe9 100644 --- a/qtools/qarray.h +++ b/qtools/qarray.h @@ -55,19 +55,19 @@ protected: public: QArray() {} - QArray( int size ) : QGArray(size*sizeof(type)) {} + QArray( int size ) : QGArray(size*(int)sizeof(type)) {} QArray( const QArray<type> &a ) : QGArray(a) {} ~QArray() {} QArray<type> &operator=(const QArray<type> &a) { return (QArray<type>&)QGArray::assign(a); } type *data() const { return (type *)QGArray::data(); } uint nrefs() const { return QGArray::nrefs(); } - uint size() const { return QGArray::size()/sizeof(type); } + uint size() const { return QGArray::size()/(int)sizeof(type); } uint count() const { return size(); } bool isEmpty() const { return QGArray::size() == 0; } bool isNull() const { return QGArray::data() == 0; } - bool resize( uint size ) { return QGArray::resize(size*sizeof(type)); } - bool truncate( uint pos ) { return QGArray::resize(pos*sizeof(type)); } + bool resize( uint size ) { return QGArray::resize(size*(int)sizeof(type)); } + bool truncate( uint pos ) { return QGArray::resize(pos*(int)sizeof(type)); } bool fill( const type &d, int size = -1 ) { return QGArray::fill((char*)&d,size,sizeof(type) ); } void detach() { QGArray::detach(); } @@ -94,9 +94,9 @@ public: int bsearch( const type &d ) const { return QGArray::bsearch((const char*)&d,sizeof(type)); } type& operator[]( int i ) const - { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } + { return (type &)(*(type *)QGArray::at(i*(int)sizeof(type))); } type& at( uint i ) const - { return (type &)(*(type *)QGArray::at(i*sizeof(type))); } + { return (type &)(*(type *)QGArray::at(i*(int)sizeof(type))); } operator const type*() const { return (const type *)QGArray::data(); } bool operator==( const QArray<type> &a ) const { return isEqual(a); } bool operator!=( const QArray<type> &a ) const { return !isEqual(a); } diff --git a/qtools/qbuffer.cpp b/qtools/qbuffer.cpp index beed0ba..f68ef54 100644 --- a/qtools/qbuffer.cpp +++ b/qtools/qbuffer.cpp @@ -375,7 +375,7 @@ int QBuffer::readLine( char *p, uint maxlen ) break; } *p = '\0'; - ioIndex = d - a.data(); + ioIndex = (int)(d - a.data()); return (uint)ioIndex - start; } diff --git a/qtools/qdatastream.cpp b/qtools/qdatastream.cpp index 7f63cbf..8505dd4 100644 --- a/qtools/qdatastream.cpp +++ b/qtools/qdatastream.cpp @@ -412,7 +412,7 @@ static Q_INT32 read_int_ascii( QDataStream *s ) n++; } buf[n] = '\0'; - return atol( buf ); + return (Q_INT32)atol( buf ); } diff --git a/qtools/qdir.cpp b/qtools/qdir.cpp index d0c1233..120abe7 100644 --- a/qtools/qdir.cpp +++ b/qtools/qdir.cpp @@ -1184,7 +1184,7 @@ int qt_cmp_si( const void *n1, const void *n2 ) if ( r == 0 ) { // Enforce an order - the order the items appear in the array - r = (char*)n1 - (char*)n2; + r = (int)((char*)n1 - (char*)n2); } if ( qt_cmp_si_sortSpec & QDir::Reversed ) diff --git a/qtools/qfile_unix.cpp b/qtools/qfile_unix.cpp index fa53d13..0422fb4 100644 --- a/qtools/qfile_unix.cpp +++ b/qtools/qfile_unix.cpp @@ -403,7 +403,7 @@ uint QFile::size() const } else { STAT( QFile::encodeName(fn), &st ); } - return st.st_size; + return (uint)st.st_size; } /*! @@ -500,13 +500,13 @@ int QFile::readBlock( char *p, uint len ) if ( nread < (int)len ) { if ( isRaw() ) { // raw file - nread += READ( fd, p, len-nread ); + nread += (int)READ( fd, p, len-nread ); if ( len && nread <= 0 ) { nread = 0; setStatus(IO_ReadError); } } else { // buffered file - nread += fread( p, 1, len-nread, fh ); + nread += (int)fread( p, 1, len-nread, fh ); if ( (uint)nread != len ) { if ( ferror( fh ) || nread==0 ) setStatus(IO_ReadError); @@ -552,9 +552,9 @@ int QFile::writeBlock( const char *p, uint len ) #endif int nwritten; // number of bytes written if ( isRaw() ) // raw file - nwritten = WRITE( fd, p, len ); + nwritten = (int)WRITE( fd, p, len ); else // buffered file - nwritten = fwrite( p, 1, len, fh ); + nwritten = (int)fwrite( p, 1, len, fh ); if ( nwritten != (int)len ) { // write error if ( errno == ENOSPC ) // disk is full setStatus( IO_ResourceError ); @@ -661,7 +661,7 @@ bool QFile::seek( int64 pos ) if (isOpen()) { // TODO: support 64 bit size - return fseek( fh, pos, SEEK_SET )!=-1; + return fseek( fh, (long)pos, SEEK_SET )!=-1; } return FALSE; } diff --git a/qtools/qfileinfo_unix.cpp b/qtools/qfileinfo_unix.cpp index 5a8fe04..f2b438c 100644 --- a/qtools/qfileinfo_unix.cpp +++ b/qtools/qfileinfo_unix.cpp @@ -124,7 +124,7 @@ QString QFileInfo::readLink() const char s[PATH_MAX+1]; if ( !isSymLink() ) return QString(); - int len = readlink( QFile::encodeName(fn).data(), s, PATH_MAX ); + int len = (int)readlink( QFile::encodeName(fn).data(), s, PATH_MAX ); if ( len >= 0 ) { s[len] = '\0'; r = QFile::decodeName(s); @@ -297,7 +297,7 @@ QDateTime QFileInfo::lastModified() const if ( !fic || !cache ) doStat(); if ( fic ) - dt.setTime_t( fic->st.st_mtime ); + dt.setTime_t( (uint)fic->st.st_mtime ); return dt; } @@ -316,7 +316,7 @@ QDateTime QFileInfo::lastRead() const if ( !fic || !cache ) doStat(); if ( fic ) - dt.setTime_t( fic->st.st_atime ); + dt.setTime_t( (uint)fic->st.st_atime ); return dt; } diff --git a/qtools/qregexp.cpp b/qtools/qregexp.cpp index 2b3770c..fcc8f11 100644 --- a/qtools/qregexp.cpp +++ b/qtools/qregexp.cpp @@ -525,7 +525,7 @@ static int matchstring( uint *rxd, const char *str, uint strlength, while ( p >= first_p ) { // go backwards int end = matchstring( d, p, pl, bol, cs ); if ( end >= 0 ) - return ( p - start ) + end; + return ( (int)(p - start) ) + end; if ( !p ) return -1; --p; @@ -587,7 +587,7 @@ static int matchstring( uint *rxd, const char *str, uint strlength, while ( p >= first_p ) { // go backwards int end = matchstring( d, p, pl, bol, cs ); if ( end >= 0 ) - return ( p - start ) + end; + return ( (int)(p - start) ) + end; if ( !p ) return -1; --p; @@ -600,7 +600,7 @@ static int matchstring( uint *rxd, const char *str, uint strlength, return -1; } } - return p - start; + return (int)(p - start); } @@ -1043,7 +1043,7 @@ void QRegExp::compile() error = PatSyntax; return; } - int ddiff = d - prev_d; + int ddiff = (int)(d - prev_d); if ( *p == '+' ) { // convert to Kleene closure if ( d + ddiff >= rxarray + maxlen ) { error = PatOverflow; // pattern too long @@ -1082,7 +1082,7 @@ void QRegExp::compile() } } GEN( END ); - int len = d - rxarray; + int len = (int)(d - rxarray); rxdata = new uint[ len ]; // copy from rxarray to rxdata CHECK_PTR( rxdata ); memcpy( rxdata, rxarray, len*sizeof(uint) ); diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp index 889e936..11187f6 100644 --- a/qtools/qstring.cpp +++ b/qtools/qstring.cpp @@ -13535,7 +13535,7 @@ QString &QString::insert( uint index, const QChar* s, uint len ) uint olen = length(); int nlen = olen + len; - int df = s - d->unicode; // ### pointer subtraction, cast down to int + int df = (int)(s - d->unicode); // ### pointer subtraction, cast down to int if ( df >= 0 && (uint)df < d->maxl ) { // Part of me - take a copy. QChar *tmp = QT_ALLOC_QCHAR_VEC( len ); @@ -13679,7 +13679,7 @@ QString &QString::replace( uint index, uint len, const QChar* s, uint slen ) real_detach(); memcpy( d->unicode+index, s, len*sizeof(QChar) ); } else { - int df = s - d->unicode; // ### pointer subtraction, cast down to int + int df = (int)(s - d->unicode); // ### pointer subtraction, cast down to int if ( df >= 0 && (uint)df < d->maxl ) { // Part of me - take a copy. QChar *tmp = QT_ALLOC_QCHAR_VEC( slen ); @@ -15017,7 +15017,7 @@ QDataStream &operator<<( QDataStream &s, const QString &str ) if ( ub || s.version() < 3 ) { if ( QChar::networkOrdered() == (s.byteOrder()==QDataStream::BigEndian) ) { - s.writeBytes( ub, sizeof(QChar)*str.length() ); + s.writeBytes( ub, (int)sizeof(QChar)*str.length() ); } else { static const uint auto_size = 1024; char t[auto_size]; @@ -15034,7 +15034,7 @@ QDataStream &operator<<( QDataStream &s, const QString &str ) *c++ = ub[0]; ub+=sizeof(QChar); } - s.writeBytes( b, sizeof(QChar)*str.length() ); + s.writeBytes( b, (int)sizeof(QChar)*str.length() ); if ( str.length()*sizeof(QChar) > auto_size ) delete [] b; } diff --git a/qtools/qtextcodec.cpp b/qtools/qtextcodec.cpp index 4eb8ba5..bb8bff4 100644 --- a/qtools/qtextcodec.cpp +++ b/qtools/qtextcodec.cpp @@ -931,11 +931,11 @@ static int getByte(char* &cursor) int byte = 0; if ( *cursor ) { if ( cursor[1] == 'x' ) - byte = strtol(cursor+2,&cursor,16); + byte = (int)strtol(cursor+2,&cursor,16); else if ( cursor[1] == 'd' ) - byte = strtol(cursor+2,&cursor,10); + byte = (int)strtol(cursor+2,&cursor,10); else - byte = strtol(cursor+2,&cursor,8); + byte = (int)strtol(cursor+2,&cursor,8); } return byte&0xff; } @@ -1017,7 +1017,7 @@ public: cursor[2]>='0' && cursor[2]<='9' && cursor[3]>='0' && cursor[3]<='9') { - unicode = strtol(cursor+2,&cursor,16); + unicode = (int)strtol(cursor+2,&cursor,16); } else if (*cursor==esc) { diff --git a/qtools/qtextstream.cpp b/qtools/qtextstream.cpp index b12f86d..21b455e 100644 --- a/qtools/qtextstream.cpp +++ b/qtools/qtextstream.cpp @@ -308,7 +308,7 @@ bool QStringBuffer::open( int m ) s->truncate( 0 ); } if ( m & IO_Append ) { // append to end of buffer - ioIndex = s->length()*sizeof(QChar); + ioIndex = s->length()*(int)sizeof(QChar); } else { ioIndex = 0; } @@ -331,7 +331,7 @@ void QStringBuffer::flush() uint QStringBuffer::size() const { - return s ? s->length()*sizeof(QChar) : 0; + return s ? s->length()*(int)sizeof(QChar) : 0; } int QStringBuffer::at() const @@ -916,7 +916,7 @@ QTextStream &QTextStream::writeBlock( const char* p, uint len ) QChar *u = new QChar[len]; for (uint i=0; i<len; i++) u[i] = p[i]; - dev->writeBlock( (char*)u, len*sizeof(QChar) ); + dev->writeBlock( (char*)u, len*(int)sizeof(QChar) ); delete [] u; } else { for (uint i=0; i<len; i++) @@ -932,7 +932,7 @@ QTextStream &QTextStream::writeBlock( const QChar* p, uint len ) doUnicodeHeader = FALSE; ts_putc( QChar::byteOrderMark ); } - dev->writeBlock( (char*)p, sizeof(QChar)*len ); + dev->writeBlock( (char*)p, (int)sizeof(QChar)*len ); } else { for (uint i=0; i<len; i++) ts_putc( p[i] ); diff --git a/qtools/qthread_unix.cpp b/qtools/qthread_unix.cpp index 5a7b788..b536583 100644 --- a/qtools/qthread_unix.cpp +++ b/qtools/qthread_unix.cpp @@ -52,6 +52,7 @@ #include <sys/types.h> #include <sys/sysctl.h> #endif +#include <signal.h> #include <unistd.h> #include <stdio.h> @@ -118,6 +119,13 @@ void QThread::start() QMutexLocker locker(&d->mutex); if (d->running) return; + // Block the SIGINT signal. The threads will inherit the signal mask. + // This will avoid them catching SIGINT instead of this thread. + sigset_t sigset, oldset; + sigemptyset(&sigset); + sigaddset(&sigset, SIGINT); + pthread_sigmask(SIG_BLOCK, &sigset, &oldset); + d->running = TRUE; d->finished = FALSE; @@ -142,6 +150,11 @@ void QThread::start() d->finished = FALSE; d->thread_id = 0; } + else + { + // Restore the old signal mask only for this thread. + pthread_sigmask(SIG_SETMASK, &oldset, NULL); + } } void QThread::terminate() @@ -182,7 +195,7 @@ int QThread::idealThreadCount() int cores = -1; #if defined(_OS_MAC_) // Mac OS X - cores = MPProcessorsScheduled(); + cores = (int)MPProcessorsScheduled(); #elif defined(_OS_HPUX_) // HP-UX struct pst_dynamic psd; diff --git a/qtools/qtools.pro b/qtools/qtools.pro deleted file mode 100644 index 4083586..0000000 --- a/qtools/qtools.pro +++ /dev/null @@ -1,107 +0,0 @@ -# -# This file was generated from qtools.pro.in on Sat Aug 11 14:29:47 CEST 2012 -# - -TEMPLATE = lib -CONFIG = warn_on staticlib debug -HEADERS = qarray.h \ - qbuffer.h \ - qcache.h \ - qgcache.h \ - qcollection.h \ - qconfig.h \ - qcstring.h \ - scstring.h \ - qdatastream.h \ - qdatetime.h \ - qdict.h \ - qdir.h \ - qfeatures.h \ - qfile.h \ - qfiledefs_p.h \ - qfileinfo.h \ - qgarray.h \ - qfeatures.h \ - qgdict.h \ - qgeneric.h \ - qglist.h \ - qglobal.h \ - qgstring.h \ - qgvector.h \ - qintdict.h \ - qiodevice.h \ - qlist.h \ - qptrdict.h \ - qqueue.h \ - qregexp.h \ - qshared.h \ - qsortedlist.h \ - qstack.h \ - qstring.h \ - qstringlist.h \ - qstrlist.h \ - qstrvec.h \ - qtextstream.h \ - qtl.h \ - qvaluelist.h \ - qvector.h \ - qxml.h \ - qvaluestack.h \ - qmap.h \ - qmodules.h \ - qthread.h \ - qthread_p.h \ - qmutex.h \ - qmutex_p.h \ - qutfcodec.h \ - qwaitcondition.h - -SOURCES = qbuffer.cpp \ - qcollection.cpp \ - scstring.cpp \ - qdatastream.cpp \ - qdatetime.cpp \ - qdir.cpp \ - qfile.cpp \ - qfileinfo.cpp \ - qgarray.cpp \ - qgcache.cpp \ - qgdict.cpp \ - qglist.cpp \ - qglobal.cpp \ - qgstring.cpp \ - qgvector.cpp \ - qiodevice.cpp \ - qregexp.cpp \ - qstring.cpp \ - qtextstream.cpp \ - qtextcodec.cpp \ - qstringlist.cpp \ - qxml.cpp \ - qmap.cpp \ - qthread.cpp \ - qmutex.cpp \ - qutfcodec.cpp - -unix:SOURCES += qfile_unix.cpp \ - qdir_unix.cpp \ - qfileinfo_unix.cpp \ - qthread_unix.cpp \ - qmutex_unix.cpp \ - qwaitcondition_unix.cpp - -win32:SOURCES += qfile_win32.cpp \ - qdir_win32.cpp \ - qfileinfo_win32.cpp \ - qthread_win32.cpp \ - qmutex_win32.cpp \ - qwaitcondition_win32.cpp - -INCLUDEPATH = . -#TMAKE_CXXFLAGS += -DQT_NO_CODECS -DQT_LITE_UNICODE -TMAKE_CXXFLAGS += -DQT_LITE_UNICODE -win32:TMAKE_CXXFLAGS += -DQT_NODLL -win32-g++:TMAKE_CXXFLAGS += -D__CYGWIN__ -DALL_STATIC -OBJECTS_DIR = ../objects -DESTDIR = ../lib -TMAKE_MOC = /usr/bin/moc diff --git a/qtools/qutfcodec.cpp b/qtools/qutfcodec.cpp index 239c092..c7094ad 100644 --- a/qtools/qutfcodec.cpp +++ b/qtools/qutfcodec.cpp @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id: qt/src/tools/qutfcodec.cpp 2.3.2 edited 2001-01-26 $ +** ** ** Implementation of QEucCodec class ** @@ -65,7 +65,7 @@ QCString QUtf8Codec::fromUnicode(const QString& uc, int& len_in_out) const *cursor++ = 0x80 | (ch.cell()&0x3f); } } - len_in_out = cursor - (uchar*)rstr.data(); + len_in_out = (int)(cursor - (uchar*)rstr.data()); rstr.truncate(len_in_out); return rstr; } @@ -201,13 +201,13 @@ public: QCString fromUnicode(const QString& uc, int& len_in_out) { if ( headerdone ) { - len_in_out = uc.length()*sizeof(QChar); + len_in_out = uc.length()*(int)sizeof(QChar); QCString d(len_in_out); memcpy(d.data(),uc.unicode(),len_in_out); return d; } else { headerdone = TRUE; - len_in_out = (1+uc.length())*sizeof(QChar); + len_in_out = (1+uc.length())*(int)sizeof(QChar); QCString d(len_in_out); memcpy(d.data(),&QChar::byteOrderMark,sizeof(QChar)); memcpy(d.data()+sizeof(QChar),uc.unicode(),uc.length()*sizeof(QChar)); diff --git a/qtools/qutfcodec.h b/qtools/qutfcodec.h index 83fab12..af864be 100644 --- a/qtools/qutfcodec.h +++ b/qtools/qutfcodec.h @@ -1,5 +1,5 @@ /**************************************************************************** -** $Id: qt/src/tools/qutfcodec.h 2.3.2 edited 2001-01-26 $ +** ** ** Definition of QEucCodec class ** |