expand tabs and related whitespace fixes in *.{cpp,h,qdoc}
the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
81157d2374
commit
882bf3475c
@ -1,4 +1,4 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
** Contact: http://www.qt-project.org/legal
|
** Contact: http://www.qt-project.org/legal
|
||||||
|
@ -79,7 +79,7 @@ bool MyModel::setData(const QModelIndex & index, const QVariant & value, int rol
|
|||||||
m_gridData[index.row()][index.column()] = value.toString();
|
m_gridData[index.row()][index.column()] = value.toString();
|
||||||
//for presentation purposes only: build and emit a joined string
|
//for presentation purposes only: build and emit a joined string
|
||||||
QString result;
|
QString result;
|
||||||
for(int row= 0; row < ROWS; row++)
|
for (int row= 0; row < ROWS; row++)
|
||||||
{
|
{
|
||||||
for(int col= 0; col < COLS; col++)
|
for(int col= 0; col < COLS; col++)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ bool MingwMakefileGenerator::findLibraries()
|
|||||||
}
|
}
|
||||||
if (!out.isEmpty()) // We assume if it never finds it that its correct
|
if (!out.isEmpty()) // We assume if it never finds it that its correct
|
||||||
(*it) = out;
|
(*it) = out;
|
||||||
} else if((*it).startsWith("-L")) {
|
} else if ((*it).startsWith("-L")) {
|
||||||
dirs.append(QMakeLocalFileName((*it).mid(2).toQString()));
|
dirs.append(QMakeLocalFileName((*it).mid(2).toQString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2285,9 +2285,9 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Dependency for the output
|
// Dependency for the output
|
||||||
if(!tmp_dep.isEmpty())
|
if (!tmp_dep.isEmpty())
|
||||||
deps = tmp_dep;
|
deps = tmp_dep;
|
||||||
if(!tmp_dep_cmd.isEmpty()) {
|
if (!tmp_dep_cmd.isEmpty()) {
|
||||||
// Execute dependency command, and add every line as a dep
|
// Execute dependency command, and add every line as a dep
|
||||||
char buff[256];
|
char buff[256];
|
||||||
QString dep_cmd = Project->replaceExtraCompilerVariables(tmp_dep_cmd,
|
QString dep_cmd = Project->replaceExtraCompilerVariables(tmp_dep_cmd,
|
||||||
@ -2347,15 +2347,15 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
|
|||||||
out);
|
out);
|
||||||
}
|
}
|
||||||
// Name for command
|
// Name for command
|
||||||
if(!tmp_cmd_name.isEmpty()) {
|
if (!tmp_cmd_name.isEmpty()) {
|
||||||
cmd_name = Project->replaceExtraCompilerVariables(tmp_cmd_name, inFile, out);
|
cmd_name = Project->replaceExtraCompilerVariables(tmp_cmd_name, inFile, out);
|
||||||
} else {
|
} else {
|
||||||
int space = cmd.indexOf(' ');
|
int space = cmd.indexOf(' ');
|
||||||
if(space != -1)
|
if (space != -1)
|
||||||
cmd_name = cmd.left(space);
|
cmd_name = cmd.left(space);
|
||||||
else
|
else
|
||||||
cmd_name = cmd;
|
cmd_name = cmd;
|
||||||
if((cmd_name[0] == '\'' || cmd_name[0] == '"') &&
|
if ((cmd_name[0] == '\'' || cmd_name[0] == '"') &&
|
||||||
cmd_name[0] == cmd_name[cmd_name.length()-1])
|
cmd_name[0] == cmd_name[cmd_name.length()-1])
|
||||||
cmd_name = cmd_name.mid(1,cmd_name.length()-2);
|
cmd_name = cmd_name.mid(1,cmd_name.length()-2);
|
||||||
}
|
}
|
||||||
|
@ -1093,7 +1093,7 @@ QResource::unregisterResource(const QString &rccFilename, const QString &resourc
|
|||||||
QResourceRoot *res = list->at(i);
|
QResourceRoot *res = list->at(i);
|
||||||
if(res->type() == QResourceRoot::Resource_File) {
|
if(res->type() == QResourceRoot::Resource_File) {
|
||||||
QDynamicFileResourceRoot *root = reinterpret_cast<QDynamicFileResourceRoot*>(res);
|
QDynamicFileResourceRoot *root = reinterpret_cast<QDynamicFileResourceRoot*>(res);
|
||||||
if(root->mappingFile() == rccFilename && root->mappingRoot() == r) {
|
if (root->mappingFile() == rccFilename && root->mappingRoot() == r) {
|
||||||
resourceList()->removeAt(i);
|
resourceList()->removeAt(i);
|
||||||
if(!root->ref.deref()) {
|
if(!root->ref.deref()) {
|
||||||
delete root;
|
delete root;
|
||||||
@ -1164,7 +1164,7 @@ QResource::unregisterResource(const uchar *rccData, const QString &resourceRoot)
|
|||||||
QResourceRoot *res = list->at(i);
|
QResourceRoot *res = list->at(i);
|
||||||
if(res->type() == QResourceRoot::Resource_Buffer) {
|
if(res->type() == QResourceRoot::Resource_Buffer) {
|
||||||
QDynamicBufferResourceRoot *root = reinterpret_cast<QDynamicBufferResourceRoot*>(res);
|
QDynamicBufferResourceRoot *root = reinterpret_cast<QDynamicBufferResourceRoot*>(res);
|
||||||
if(root->mappingBuffer() == rccData && root->mappingRoot() == r) {
|
if (root->mappingBuffer() == rccData && root->mappingRoot() == r) {
|
||||||
resourceList()->removeAt(i);
|
resourceList()->removeAt(i);
|
||||||
if(!root->ref.deref()) {
|
if(!root->ref.deref()) {
|
||||||
delete root;
|
delete root;
|
||||||
|
@ -672,11 +672,11 @@ void QStateMachinePrivate::addStatesToEnter(QAbstractState *s, QState *root,
|
|||||||
QAbstractState *s0 = hconf.at(k);
|
QAbstractState *s0 = hconf.at(k);
|
||||||
addStatesToEnter(s0, root, statesToEnter, statesForDefaultEntry);
|
addStatesToEnter(s0, root, statesToEnter, statesForDefaultEntry);
|
||||||
}
|
}
|
||||||
#ifdef QSTATEMACHINE_DEBUG
|
#ifdef QSTATEMACHINE_DEBUG
|
||||||
qDebug() <<q_func() << ": restoring"
|
qDebug() << q_func() << ": restoring"
|
||||||
<< ((QHistoryStatePrivate::get(h)->historyType == QHistoryState::DeepHistory) ? "deep" : "shallow")
|
<< ((QHistoryStatePrivate::get(h)->historyType == QHistoryState::DeepHistory) ? "deep" : "shallow")
|
||||||
<< "history from" << s << ':' << hconf;
|
<< "history from" << s << ':' << hconf;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
QList<QAbstractState*> hlst;
|
QList<QAbstractState*> hlst;
|
||||||
if (QHistoryStatePrivate::get(h)->defaultState)
|
if (QHistoryStatePrivate::get(h)->defaultState)
|
||||||
@ -689,9 +689,9 @@ void QStateMachinePrivate::addStatesToEnter(QAbstractState *s, QState *root,
|
|||||||
QAbstractState *s0 = hlst.at(k);
|
QAbstractState *s0 = hlst.at(k);
|
||||||
addStatesToEnter(s0, root, statesToEnter, statesForDefaultEntry);
|
addStatesToEnter(s0, root, statesToEnter, statesForDefaultEntry);
|
||||||
}
|
}
|
||||||
#ifdef QSTATEMACHINE_DEBUG
|
#ifdef QSTATEMACHINE_DEBUG
|
||||||
qDebug() << q_func() << ": initial history targets for" << s << ':' << hlst;
|
qDebug() << q_func() << ": initial history targets for" << s << ':' << hlst;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -664,7 +664,7 @@ QBitmap tst_QPainter::getBitmap( const QString &dir, const QString &filename, bo
|
|||||||
if ( mask ) {
|
if ( mask ) {
|
||||||
QBitmap mask;
|
QBitmap mask;
|
||||||
QString maskFilename = dir + QString( "/%1-mask.xbm" ).arg( filename );
|
QString maskFilename = dir + QString( "/%1-mask.xbm" ).arg( filename );
|
||||||
if ( !mask.load( maskFilename ) ) {
|
if (!mask.load(maskFilename)) {
|
||||||
QWARN(QString("Could not load mask '%1'").arg(maskFilename).toLatin1());
|
QWARN(QString("Could not load mask '%1'").arg(maskFilename).toLatin1());
|
||||||
return QBitmap();
|
return QBitmap();
|
||||||
}
|
}
|
||||||
@ -698,15 +698,15 @@ static QRect getPaintedSize(const QImage &image, const QColor &background)
|
|||||||
uint color = background.rgba();
|
uint color = background.rgba();
|
||||||
|
|
||||||
for ( int y = 0; y < image.height(); ++y ) {
|
for ( int y = 0; y < image.height(); ++y ) {
|
||||||
for ( int x = 0; x < image.width(); ++x ) {
|
for (int x = 0; x < image.width(); ++x) {
|
||||||
QRgb pixel = image.pixel( x, y );
|
QRgb pixel = image.pixel( x, y );
|
||||||
if ( pixel != color && x < xmin )
|
if (pixel != color && x < xmin)
|
||||||
xmin = x;
|
xmin = x;
|
||||||
if ( pixel != color && x > xmax )
|
if (pixel != color && x > xmax)
|
||||||
xmax = x;
|
xmax = x;
|
||||||
if ( pixel != color && y < ymin )
|
if (pixel != color && y < ymin)
|
||||||
ymin = y;
|
ymin = y;
|
||||||
if ( pixel != color && y > ymax )
|
if (pixel != color && y > ymax)
|
||||||
ymax = y;
|
ymax = y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,13 +61,13 @@ static QPixmap createDestPixmap()
|
|||||||
QPainter painter;
|
QPainter painter;
|
||||||
painter.begin( &pm );
|
painter.begin( &pm );
|
||||||
for ( int i=0; i<colorbands; i++ ) {
|
for ( int i=0; i<colorbands; i++ ) {
|
||||||
for ( int j=0; j<intensities; j++ ) {
|
for (int j = 0; j < intensities; j++) {
|
||||||
int intensity = 255 * (j+1) / intensities; // 25%, 50%, 75% and 100%
|
int intensity = 255 * (j+1) / intensities; // 25%, 50%, 75% and 100%
|
||||||
for ( int k=0; k<8; k++ ) {
|
for (int k = 0; k < 8; k++) {
|
||||||
QColor col = baseColor( k, intensity );
|
QColor col = baseColor(k, intensity);
|
||||||
painter.setPen( QPen( col, 1 ) );
|
painter.setPen(QPen(col, 1));
|
||||||
painter.setBrush( col );
|
painter.setBrush(col);
|
||||||
painter.drawRect( k*4, j*4 + i*intensities*4, 4, 4 );
|
painter.drawRect(k*4, j*4 + i*intensities*4, 4, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -127,14 +127,14 @@ static QBitmap createSrcBitmap( int size, int border )
|
|||||||
painter.drawRect( border, border, size, size2 );
|
painter.drawRect( border, border, size, size2 );
|
||||||
painter.end();
|
painter.end();
|
||||||
if ( border > 0 ) {
|
if ( border > 0 ) {
|
||||||
QBitmap mask( totalSize, totalSize, true );
|
QBitmap mask(totalSize, totalSize, true);
|
||||||
QPainter painter;
|
QPainter painter;
|
||||||
painter.begin( &mask );
|
painter.begin(&mask);
|
||||||
painter.setPen( QPen( Qt::color1, 1 ) );
|
painter.setPen(QPen(Qt::color1, 1));
|
||||||
painter.setBrush( Qt::color1 );
|
painter.setBrush(Qt::color1);
|
||||||
painter.drawRect( border, border, size, size );
|
painter.drawRect(border, border, size, size);
|
||||||
painter.end();
|
painter.end();
|
||||||
bm.setMask( mask );
|
bm.setMask(mask);
|
||||||
}
|
}
|
||||||
return bm;
|
return bm;
|
||||||
}
|
}
|
||||||
@ -147,48 +147,48 @@ int main( int argc, char **argv )
|
|||||||
// input for tst_QPainter::drawLine_rop_bitmap()
|
// input for tst_QPainter::drawLine_rop_bitmap()
|
||||||
{
|
{
|
||||||
QBitmap dst = createDestBitmap();
|
QBitmap dst = createDestBitmap();
|
||||||
dst.save( "../../drawLine_rop_bitmap/dst.xbm", "XBM" );
|
dst.save("../../drawLine_rop_bitmap/dst.xbm", "XBM");
|
||||||
}
|
}
|
||||||
|
|
||||||
// input for tst_QPainter::drawPixmap_rop_bitmap()
|
// input for tst_QPainter::drawPixmap_rop_bitmap()
|
||||||
{
|
{
|
||||||
QBitmap dst = createDestBitmap();
|
QBitmap dst = createDestBitmap();
|
||||||
QBitmap src1 = createSrcBitmap( 4, 2 );
|
QBitmap src1 = createSrcBitmap(4, 2);
|
||||||
QBitmap src2 = createSrcBitmap( 4, 0 );
|
QBitmap src2 = createSrcBitmap(4, 0);
|
||||||
dst.save( "../../drawPixmap_rop_bitmap/dst.xbm", "XBM" );
|
dst.save("../../drawPixmap_rop_bitmap/dst.xbm", "XBM");
|
||||||
src1.save( "../../drawPixmap_rop_bitmap/src1.xbm", "XBM" );
|
src1.save("../../drawPixmap_rop_bitmap/src1.xbm", "XBM");
|
||||||
src1.mask()->save( "../../drawPixmap_rop_bitmap/src1-mask.xbm", "XBM" );
|
src1.mask()->save("../../drawPixmap_rop_bitmap/src1-mask.xbm", "XBM");
|
||||||
src2.save( "../../drawPixmap_rop_bitmap/src2.xbm", "XBM" );
|
src2.save("../../drawPixmap_rop_bitmap/src2.xbm", "XBM");
|
||||||
}
|
}
|
||||||
|
|
||||||
// input for tst_QPainter::drawPixmap_rop()
|
// input for tst_QPainter::drawPixmap_rop()
|
||||||
{
|
{
|
||||||
QPixmap dst1 = createDestPixmap();
|
QPixmap dst1 = createDestPixmap();
|
||||||
QPixmap dst2 = createDestPixmap();
|
QPixmap dst2 = createDestPixmap();
|
||||||
dst2.resize( 32, 32 );
|
dst2.resize(32, 32);
|
||||||
QBitmap src1 = createSrcBitmap( 32, 0 );
|
QBitmap src1 = createSrcBitmap(32, 0);
|
||||||
|
|
||||||
QBitmap src_tmp = createSrcBitmap( 32, 0 ).xForm( QWMatrix( 1, 0, 0, -1, 0, 0 ) );
|
QBitmap src_tmp = createSrcBitmap(32, 0).xForm(QWMatrix(1, 0, 0, -1, 0, 0));
|
||||||
src_tmp.resize( 32, 48 );
|
src_tmp.resize(32, 48);
|
||||||
QBitmap src2 = src_tmp.xForm( QWMatrix( 1, 0, 0, -1, 0, 0 ) );
|
QBitmap src2 = src_tmp.xForm(QWMatrix(1, 0, 0, -1, 0, 0));
|
||||||
QBitmap mask( 32, 48, true );
|
QBitmap mask(32, 48, true);
|
||||||
{
|
{
|
||||||
QPainter painter;
|
QPainter painter;
|
||||||
painter.begin( &mask );
|
painter.begin(&mask);
|
||||||
painter.setPen( QPen( Qt::color1, 1 ) );
|
painter.setPen(QPen(Qt::color1, 1));
|
||||||
painter.setBrush( Qt::color1 );
|
painter.setBrush(Qt::color1);
|
||||||
painter.drawRect( 0, 16, 32, 32 );
|
painter.drawRect(0, 16, 32, 32);
|
||||||
painter.end();
|
painter.end();
|
||||||
}
|
}
|
||||||
src2.setMask( mask );
|
src2.setMask(mask);
|
||||||
|
|
||||||
QBitmap src3 = createSrcBitmap( 32, 0 ).xForm( QWMatrix( 1, 0, 0, -1, 0, 0 ) );
|
QBitmap src3 = createSrcBitmap(32, 0).xForm(QWMatrix(1, 0, 0, -1, 0, 0));
|
||||||
|
|
||||||
dst1.save( "../../drawPixmap_rop/dst1.png", "PNG" );
|
dst1.save("../../drawPixmap_rop/dst1.png", "PNG");
|
||||||
dst2.save( "../../drawPixmap_rop/dst2.png", "PNG" );
|
dst2.save("../../drawPixmap_rop/dst2.png", "PNG");
|
||||||
src1.save( "../../drawPixmap_rop/src1.xbm", "XBM" );
|
src1.save("../../drawPixmap_rop/src1.xbm", "XBM");
|
||||||
src2.save( "../../drawPixmap_rop/src2.xbm", "XBM" );
|
src2.save("../../drawPixmap_rop/src2.xbm", "XBM");
|
||||||
src2.mask()->save( "../../drawPixmap_rop/src2-mask.xbm", "XBM" );
|
src2.mask()->save("../../drawPixmap_rop/src2-mask.xbm", "XBM");
|
||||||
src3.save( "../../drawPixmap_rop/src3.xbm", "XBM" );
|
src3.save("../../drawPixmap_rop/src3.xbm", "XBM");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,11 +77,11 @@ void tst_QPolygon::makeEllipse()
|
|||||||
// make sure that all points are R+-1 away from the center
|
// make sure that all points are R+-1 away from the center
|
||||||
bool err = false;
|
bool err = false;
|
||||||
for (i = 1; i < pa.size(); i++) {
|
for (i = 1; i < pa.size(); i++) {
|
||||||
QPoint p = pa.at( i );
|
QPoint p = pa.at(i);
|
||||||
double r = sqrt( pow( double(p.x() - R), 2.0 ) + pow( double(p.y() - R), 2.0 ) );
|
double r = sqrt(pow(double(p.x() - R), 2.0) + pow(double(p.y() - R), 2.0));
|
||||||
// ### too strict ? at least from visual inspection it looks
|
// ### too strict ? at least from visual inspection it looks
|
||||||
// quite odd around the main axes. 2.0 passes easily.
|
// quite odd around the main axes. 2.0 passes easily.
|
||||||
err |= ( qAbs( r - double(R) ) > 2.0 );
|
err |= (qAbs(r - double(R)) > 2.0);
|
||||||
}
|
}
|
||||||
QVERIFY( !err );
|
QVERIFY( !err );
|
||||||
}
|
}
|
||||||
|
@ -110,18 +110,18 @@ void tst_QRegion::boundingRect()
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
QRect rect;
|
QRect rect;
|
||||||
QRegion region( rect );
|
QRegion region(rect);
|
||||||
QCOMPARE( region.boundingRect(), rect );
|
QCOMPARE(region.boundingRect(), rect);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QRect rect( 10, -20, 30, 40 );
|
QRect rect(10, -20, 30, 40);
|
||||||
QRegion region( rect );
|
QRegion region(rect);
|
||||||
QCOMPARE( region.boundingRect(), rect );
|
QCOMPARE(region.boundingRect(), rect);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QRect rect(15,25,10,10);
|
QRect rect(15,25,10,10);
|
||||||
QRegion region( rect );
|
QRegion region(rect);
|
||||||
QCOMPARE( region.boundingRect(), rect );
|
QCOMPARE(region.boundingRect(), rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -130,56 +130,56 @@ void tst_QRegion::rects()
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
QRect rect;
|
QRect rect;
|
||||||
QRegion region( rect );
|
QRegion region(rect);
|
||||||
QVERIFY( region.isEmpty() );
|
QVERIFY(region.isEmpty());
|
||||||
QVERIFY( region.rects().isEmpty() );
|
QVERIFY(region.rects().isEmpty());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QRect rect( 10, -20, 30, 40 );
|
QRect rect(10, -20, 30, 40);
|
||||||
QRegion region( rect );
|
QRegion region(rect);
|
||||||
QCOMPARE( region.rects().count(), 1 );
|
QCOMPARE(region.rects().count(), 1);
|
||||||
QCOMPARE( region.rects()[0], rect );
|
QCOMPARE(region.rects()[0], rect);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QRect r( QPoint(10, 10), QPoint(40, 40) );
|
QRect r(QPoint(10, 10), QPoint(40, 40));
|
||||||
QRegion region( r );
|
QRegion region(r);
|
||||||
QVERIFY( region.contains( QPoint(10,10) ) );
|
QVERIFY(region.contains(QPoint(10,10)));
|
||||||
QVERIFY( region.contains( QPoint(20,40) ) );
|
QVERIFY(region.contains(QPoint(20,40)));
|
||||||
QVERIFY( region.contains( QPoint(40,20) ) );
|
QVERIFY(region.contains(QPoint(40,20)));
|
||||||
QVERIFY( !region.contains( QPoint(20,41) ) );
|
QVERIFY(!region.contains(QPoint(20,41)));
|
||||||
QVERIFY( !region.contains( QPoint(41,20) ) );
|
QVERIFY(!region.contains(QPoint(41,20)));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QRect r( 10, 10, 30, 30 );
|
QRect r(10, 10, 30, 30);
|
||||||
QRegion region( r );
|
QRegion region(r);
|
||||||
QVERIFY( region.contains( QPoint(10,10) ) );
|
QVERIFY(region.contains(QPoint(10,10)));
|
||||||
QVERIFY( region.contains( QPoint(20,39) ) );
|
QVERIFY(region.contains(QPoint(20,39)));
|
||||||
QVERIFY( region.contains( QPoint(39,20) ) );
|
QVERIFY(region.contains(QPoint(39,20)));
|
||||||
QVERIFY( !region.contains( QPoint(20,40) ) );
|
QVERIFY(!region.contains(QPoint(20,40)));
|
||||||
QVERIFY( !region.contains( QPoint(40,20) ) );
|
QVERIFY(!region.contains(QPoint(40,20)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QRegion::swap()
|
void tst_QRegion::swap()
|
||||||
{
|
{
|
||||||
QRegion r1(QRect( 0, 0,10,10));
|
QRegion r1(QRect(0, 0,10,10));
|
||||||
QRegion r2(QRect(10,10,10,10));
|
QRegion r2(QRect(10,10,10,10));
|
||||||
r1.swap(r2);
|
r1.swap(r2);
|
||||||
QCOMPARE(r1.rects().front(), QRect(10,10,10,10));
|
QCOMPARE(r1.rects().front(), QRect(10,10,10,10));
|
||||||
QCOMPARE(r2.rects().front(), QRect( 0, 0,10,10));
|
QCOMPARE(r2.rects().front(), QRect(0, 0,10,10));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QRegion::setRects()
|
void tst_QRegion::setRects()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
QRegion region;
|
QRegion region;
|
||||||
region.setRects( 0, 0 );
|
region.setRects(0, 0);
|
||||||
QVERIFY( region.rects().isEmpty() );
|
QVERIFY(region.rects().isEmpty());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QRegion region;
|
QRegion region;
|
||||||
QRect rect;
|
QRect rect;
|
||||||
region.setRects( &rect, 0 );
|
region.setRects(&rect, 0);
|
||||||
QVERIFY(region.isEmpty());
|
QVERIFY(region.isEmpty());
|
||||||
QVERIFY(region == QRegion());
|
QVERIFY(region == QRegion());
|
||||||
QVERIFY(!region.boundingRect().isValid());
|
QVERIFY(!region.boundingRect().isValid());
|
||||||
@ -188,16 +188,16 @@ void tst_QRegion::setRects()
|
|||||||
{
|
{
|
||||||
QRegion region;
|
QRegion region;
|
||||||
QRect rect;
|
QRect rect;
|
||||||
region.setRects( &rect, 1 );
|
region.setRects(&rect, 1);
|
||||||
QVERIFY( !region.boundingRect().isValid() );
|
QVERIFY(!region.boundingRect().isValid());
|
||||||
QVERIFY( region.rects().isEmpty() );
|
QVERIFY(region.rects().isEmpty());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QRegion region;
|
QRegion region;
|
||||||
QRect rect( 10, -20, 30, 40 );
|
QRect rect(10, -20, 30, 40);
|
||||||
region.setRects( &rect, 1 );
|
region.setRects(&rect, 1);
|
||||||
QCOMPARE( region.rects().count(), 1 );
|
QCOMPARE(region.rects().count(), 1);
|
||||||
QCOMPARE( region.rects()[0], rect );
|
QCOMPARE(region.rects()[0], rect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,30 +242,30 @@ void tst_QRegion::polygonRegion()
|
|||||||
{
|
{
|
||||||
QPolygon pa;
|
QPolygon pa;
|
||||||
{
|
{
|
||||||
QRegion region ( pa );
|
QRegion region (pa);
|
||||||
QVERIFY( region.isEmpty() );
|
QVERIFY(region.isEmpty());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
pa.setPoints( 8, 10, 10, // a____________b
|
pa.setPoints(8, 10, 10, // a____________b
|
||||||
40, 10, // | |
|
40, 10, // | |
|
||||||
40, 20, // |___ ___|
|
40, 20, // |___ ___|
|
||||||
30, 20, // | |
|
30, 20, // | |
|
||||||
30, 40, // | |
|
30, 40, // | |
|
||||||
20, 40, // | |
|
20, 40, // | |
|
||||||
20, 20, // |____c
|
20, 20, // |____c
|
||||||
10, 20 );
|
10, 20);
|
||||||
|
|
||||||
QRegion region ( pa );
|
QRegion region (pa);
|
||||||
QVERIFY( !region.isEmpty() );
|
QVERIFY(!region.isEmpty());
|
||||||
|
|
||||||
// These should not be inside the circle
|
// These should not be inside the circle
|
||||||
QVERIFY( !region.contains( QPoint( 9, 9 ) ) );
|
QVERIFY(!region.contains(QPoint( 9, 9)));
|
||||||
QVERIFY( !region.contains( QPoint( 30, 41 ) ) );
|
QVERIFY(!region.contains(QPoint(30, 41)));
|
||||||
QVERIFY( !region.contains( QPoint( 41, 10 ) ) );
|
QVERIFY(!region.contains(QPoint(41, 10)));
|
||||||
QVERIFY( !region.contains( QPoint( 31, 21 ) ) );
|
QVERIFY(!region.contains(QPoint(31, 21)));
|
||||||
|
|
||||||
// These should be inside
|
// These should be inside
|
||||||
QVERIFY( region.contains( QPoint( 10, 10 ) ) ); // Upper-left (a)
|
QVERIFY(region.contains(QPoint(10, 10))); // Upper-left (a)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -345,29 +345,29 @@ void tst_QRegion::bitmapRegion()
|
|||||||
{
|
{
|
||||||
QBitmap circle;
|
QBitmap circle;
|
||||||
{
|
{
|
||||||
QRegion region( circle );
|
QRegion region(circle);
|
||||||
QVERIFY( region.isEmpty() );
|
QVERIFY(region.isEmpty());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
circle = QPixmap( circle_xpm );
|
circle = QPixmap(circle_xpm);
|
||||||
QRegion region( circle );
|
QRegion region(circle);
|
||||||
|
|
||||||
//// These should not be inside the circe
|
//// These should not be inside the circe
|
||||||
QVERIFY( !region.contains( QPoint( 2, 2 ) ) );
|
QVERIFY(!region.contains(QPoint(2, 2)));
|
||||||
QVERIFY( !region.contains( QPoint( 2, 17 ) ) );
|
QVERIFY(!region.contains(QPoint(2, 17)));
|
||||||
QVERIFY( !region.contains( QPoint( 17, 2 ) ) );
|
QVERIFY(!region.contains(QPoint(17, 2)));
|
||||||
QVERIFY( !region.contains( QPoint( 17, 17 ) ) );
|
QVERIFY(!region.contains(QPoint(17, 17)));
|
||||||
|
|
||||||
//// These should be inside
|
//// These should be inside
|
||||||
QVERIFY( region.contains( QPoint( 3, 3 ) ) );
|
QVERIFY(region.contains(QPoint(3, 3)));
|
||||||
QVERIFY( region.contains( QPoint( 3, 16 ) ) );
|
QVERIFY(region.contains(QPoint(3, 16)));
|
||||||
QVERIFY( region.contains( QPoint( 16, 3 ) ) );
|
QVERIFY(region.contains(QPoint(16, 3)));
|
||||||
QVERIFY( region.contains( QPoint( 16, 16 ) ) );
|
QVERIFY(region.contains(QPoint(16, 16)));
|
||||||
|
|
||||||
QVERIFY( region.contains( QPoint( 0, 10 ) ) ); // Mid-left
|
QVERIFY(region.contains(QPoint(0, 10))); // Mid-left
|
||||||
QVERIFY( region.contains( QPoint( 10, 0 ) ) ); // Mid-top
|
QVERIFY(region.contains(QPoint(10, 0))); // Mid-top
|
||||||
QVERIFY( region.contains( QPoint( 19, 10 ) ) ); // Mid-right
|
QVERIFY(region.contains(QPoint(19, 10))); // Mid-right
|
||||||
QVERIFY( region.contains( QPoint( 10, 19 ) ) ); // Mid-bottom
|
QVERIFY(region.contains(QPoint(10, 19))); // Mid-bottom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,14 +343,14 @@ void tst_QFont::compare()
|
|||||||
QFont font;
|
QFont font;
|
||||||
{
|
{
|
||||||
QFont font2 = font;
|
QFont font2 = font;
|
||||||
font2.setPointSize( 24 );
|
font2.setPointSize(24);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QFont font2 = font;
|
QFont font2 = font;
|
||||||
font2.setPixelSize( 24 );
|
font2.setPixelSize(24);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,59 +362,59 @@ void tst_QFont::compare()
|
|||||||
font.setOverline(false);
|
font.setOverline(false);
|
||||||
{
|
{
|
||||||
QFont font2 = font;
|
QFont font2 = font;
|
||||||
font2.setPointSize( 24 );
|
font2.setPointSize(24);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QFont font2 = font;
|
QFont font2 = font;
|
||||||
font2.setPixelSize( 24 );
|
font2.setPixelSize(24);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QFont font2 = font;
|
QFont font2 = font;
|
||||||
|
|
||||||
font2.setItalic(true);
|
font2.setItalic(true);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
font2.setItalic(false);
|
font2.setItalic(false);
|
||||||
QVERIFY( font == font2 );
|
QVERIFY(font == font2);
|
||||||
QVERIFY(!(font < font2));
|
QVERIFY(!(font < font2));
|
||||||
|
|
||||||
font2.setWeight(QFont::Bold);
|
font2.setWeight(QFont::Bold);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
font2.setWeight(QFont::Normal);
|
font2.setWeight(QFont::Normal);
|
||||||
QVERIFY( font == font2 );
|
QVERIFY(font == font2);
|
||||||
QVERIFY(!(font < font2));
|
QVERIFY(!(font < font2));
|
||||||
|
|
||||||
font.setUnderline(true);
|
font.setUnderline(true);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
font.setUnderline(false);
|
font.setUnderline(false);
|
||||||
QVERIFY( font == font2 );
|
QVERIFY(font == font2);
|
||||||
QVERIFY(!(font < font2));
|
QVERIFY(!(font < font2));
|
||||||
|
|
||||||
font.setStrikeOut(true);
|
font.setStrikeOut(true);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
font.setStrikeOut(false);
|
font.setStrikeOut(false);
|
||||||
QVERIFY( font == font2 );
|
QVERIFY(font == font2);
|
||||||
QVERIFY(!(font < font2));
|
QVERIFY(!(font < font2));
|
||||||
|
|
||||||
font.setOverline(true);
|
font.setOverline(true);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
font.setOverline(false);
|
font.setOverline(false);
|
||||||
QVERIFY( font == font2 );
|
QVERIFY(font == font2);
|
||||||
QVERIFY(!(font < font2));
|
QVERIFY(!(font < font2));
|
||||||
|
|
||||||
font.setCapitalization(QFont::SmallCaps);
|
font.setCapitalization(QFont::SmallCaps);
|
||||||
QVERIFY( font != font2 );
|
QVERIFY(font != font2);
|
||||||
QCOMPARE(font < font2,!(font2 < font));
|
QCOMPARE(font < font2,!(font2 < font));
|
||||||
font.setCapitalization(QFont::MixedCase);
|
font.setCapitalization(QFont::MixedCase);
|
||||||
QVERIFY( font == font2 );
|
QVERIFY(font == font2);
|
||||||
QVERIFY(!(font < font2));
|
QVERIFY(!(font < font2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ void tst_QFontDatabase::styles()
|
|||||||
QString trimmed = style.trimmed();
|
QString trimmed = style.trimmed();
|
||||||
++it;
|
++it;
|
||||||
|
|
||||||
QCOMPARE( style, trimmed );
|
QCOMPARE(style, trimmed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ void tst_QFontDatabase::fixedPitch()
|
|||||||
|
|
||||||
QFontDatabase fdb;
|
QFontDatabase fdb;
|
||||||
if (!fdb.families().contains(font))
|
if (!fdb.families().contains(font))
|
||||||
QSKIP( "Font not installed");
|
QSKIP("Font not installed");
|
||||||
|
|
||||||
QCOMPARE(fdb.isFixedPitch(font), fixedPitch);
|
QCOMPARE(fdb.isFixedPitch(font), fixedPitch);
|
||||||
|
|
||||||
|
@ -179,10 +179,10 @@ void tst_QTextPieceTable::insertion4()
|
|||||||
str += c;
|
str += c;
|
||||||
table->insert(pos, str, charFormatIndex);
|
table->insert(pos, str, charFormatIndex);
|
||||||
compare.insert(pos, str);
|
compare.insert(pos, str);
|
||||||
// if (table->text() != compare) {
|
// if (table->text() != compare) {
|
||||||
// qDebug("compare failed: i=%d (current char=%c) insert at %d\nexpected '%s'\ngot '%s'", i, (i % 26) + (i>25?'A':'a'), pos, compare.latin1(), table->text().latin1());
|
// qDebug("compare failed: i=%d (current char=%c) insert at %d\nexpected '%s'\ngot '%s'", i, (i % 26) + (i>25?'A':'a'), pos, compare.latin1(), table->text().latin1());
|
||||||
// exit(12);
|
// exit(12);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
QVERIFY(table->plainText() == compare);
|
QVERIFY(table->plainText() == compare);
|
||||||
}
|
}
|
||||||
@ -263,10 +263,10 @@ void tst_QTextPieceTable::removal3()
|
|||||||
table->insert(pos, str, charFormatIndex);
|
table->insert(pos, str, charFormatIndex);
|
||||||
}
|
}
|
||||||
l += remove ? -1 : 2;
|
l += remove ? -1 : 2;
|
||||||
// if (table->text() != compare) {
|
// if (table->text() != compare) {
|
||||||
// qDebug("compare failed: i=%d (current char=%c) insert at %d\nexpected '%s'\ngot '%s'", i, (i % 26) + (i>25?'A':'a'), pos, compare.latin1(), table->text().latin1());
|
// qDebug("compare failed: i=%d (current char=%c) insert at %d\nexpected '%s'\ngot '%s'", i, (i % 26) + (i>25?'A':'a'), pos, compare.latin1(), table->text().latin1());
|
||||||
// exit(12);
|
// exit(12);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
QVERIFY(table->plainText() == compare);
|
QVERIFY(table->plainText() == compare);
|
||||||
}
|
}
|
||||||
|
@ -1836,11 +1836,11 @@ void tst_Collections::map()
|
|||||||
map[3] = 8;
|
map[3] = 8;
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
QMutableMapIterator<int,int> i = map;
|
QMutableMapIterator<int,int> i = map;
|
||||||
while(i.hasNext())
|
while (i.hasNext())
|
||||||
if (i.next().key() == 2)
|
if (i.next().key() == 2)
|
||||||
i.remove();
|
i.remove();
|
||||||
i.toFront();
|
i.toFront();
|
||||||
while(i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
sum += i.next().value();
|
sum += i.next().value();
|
||||||
i.setValue(10);
|
i.setValue(10);
|
||||||
i.value() += 22;
|
i.value() += 22;
|
||||||
|
@ -902,7 +902,7 @@ void tst_QSqlDatabase::recordMySQL()
|
|||||||
FieldDef("bigint unsigned", QVariant::ULongLong, Q_UINT64_C(18446744073709551615)),
|
FieldDef("bigint unsigned", QVariant::ULongLong, Q_UINT64_C(18446744073709551615)),
|
||||||
FieldDef("float", QVariant::Double, 1.12345),
|
FieldDef("float", QVariant::Double, 1.12345),
|
||||||
FieldDef("double", QVariant::Double, 1.123456789),
|
FieldDef("double", QVariant::Double, 1.123456789),
|
||||||
FieldDef("decimal(10, 9)", QVariant::Double,1.123456789),
|
FieldDef("decimal(10, 9)", QVariant::Double, 1.123456789),
|
||||||
FieldDef("numeric(5, 2)", QVariant::Double, 123.67),
|
FieldDef("numeric(5, 2)", QVariant::Double, 123.67),
|
||||||
FieldDef("date", QVariant::Date, QDate::currentDate()),
|
FieldDef("date", QVariant::Date, QDate::currentDate()),
|
||||||
FieldDef("datetime", QVariant::DateTime, dt),
|
FieldDef("datetime", QVariant::DateTime, dt),
|
||||||
|
@ -338,20 +338,20 @@ void tst_QApplication::multiple()
|
|||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
while ( i++ < 5 ) {
|
while (i++ < 5) {
|
||||||
TestApplication app( argc, 0 );
|
TestApplication app(argc, 0);
|
||||||
|
|
||||||
if ( features.contains( "QFont" ) ) {
|
if (features.contains("QFont")) {
|
||||||
// create font and force loading
|
// create font and force loading
|
||||||
QFont font( "Arial", 12 );
|
QFont font("Arial", 12);
|
||||||
QFontInfo finfo( font );
|
QFontInfo finfo(font);
|
||||||
finfo.exactMatch();
|
finfo.exactMatch();
|
||||||
}
|
}
|
||||||
if ( features.contains( "QPixmap" ) ) {
|
if (features.contains("QPixmap")) {
|
||||||
QPixmap pix( 100, 100 );
|
QPixmap pix(100, 100);
|
||||||
pix.fill( Qt::black );
|
pix.fill(Qt::black);
|
||||||
}
|
}
|
||||||
if ( features.contains( "QWidget" ) ) {
|
if (features.contains("QWidget")) {
|
||||||
QWidget widget;
|
QWidget widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ void tst_QShortcut::number_data()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
QTest::newRow("N004 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N004 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N004:Shift+F1 - [Shift+F1]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("N004:Shift+F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("N004:F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N004:F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N004 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
QTest::newRow("N004 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ void tst_QShortcut::number_data()
|
|||||||
Qt::Key_Backtab on Qt::Key_Tab
|
Qt::Key_Backtab on Qt::Key_Tab
|
||||||
Shift + Qt::Key_Backtab on Qt::Key_Tab
|
Shift + Qt::Key_Backtab on Qt::Key_Tab
|
||||||
*/
|
*/
|
||||||
QTest::newRow("N005a - slot1") << SetupAccel << TriggerSlot1 << QString("")<< int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N005a - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N005a:Tab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("N005a:Tab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
//commented out because the behaviour changed, those tests should be updated
|
//commented out because the behaviour changed, those tests should be updated
|
||||||
//QTest::newRow("N005a:Shift+Tab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
//QTest::newRow("N005a:Shift+Tab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
@ -355,11 +355,11 @@ void tst_QShortcut::number_data()
|
|||||||
Qt::Key_Backtab on Shift + Qt::Key_Tab
|
Qt::Key_Backtab on Shift + Qt::Key_Tab
|
||||||
Shift + Qt::Key_Backtab on Shift + Qt::Key_Tab
|
Shift + Qt::Key_Backtab on Shift + Qt::Key_Tab
|
||||||
*/
|
*/
|
||||||
QTest::newRow("N005b - slot1") << SetupAccel << TriggerSlot1 << QString("")<< int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N005b - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N005b:Tab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N005b:Tab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N005b:Shift+Tab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("N005b:Shift+Tab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("N005b:BackTab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N005b:BackTab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N005b:Shift+BackTab - [Shift+Tab]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("N005b:Shift+BackTab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("N005b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
QTest::newRow("N005b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
||||||
|
|
||||||
/* Testing Single Sequences
|
/* Testing Single Sequences
|
||||||
@ -368,7 +368,7 @@ void tst_QShortcut::number_data()
|
|||||||
Qt::Key_Backtab on Qt::Key_Backtab
|
Qt::Key_Backtab on Qt::Key_Backtab
|
||||||
Shift + Qt::Key_Backtab on Qt::Key_Backtab
|
Shift + Qt::Key_Backtab on Qt::Key_Backtab
|
||||||
*/
|
*/
|
||||||
QTest::newRow("N006a - slot1") << SetupAccel << TriggerSlot1 << QString("")<< int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N006a - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N006a:Tab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N006a:Tab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
// This should work, since platform dependent code will transform the
|
// This should work, since platform dependent code will transform the
|
||||||
// Shift+Tab into a Shift+BackTab, which should trigger the shortcut
|
// Shift+Tab into a Shift+BackTab, which should trigger the shortcut
|
||||||
@ -384,11 +384,11 @@ void tst_QShortcut::number_data()
|
|||||||
Qt::Key_Backtab on Shift + Qt::Key_Backtab
|
Qt::Key_Backtab on Shift + Qt::Key_Backtab
|
||||||
Shift + Qt::Key_Backtab on Shift + Qt::Key_Backtab
|
Shift + Qt::Key_Backtab on Shift + Qt::Key_Backtab
|
||||||
*/
|
*/
|
||||||
QTest::newRow("N006b - slot1") << SetupAccel << TriggerSlot1 << QString("")<< int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N006b - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N006b:Tab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N006b:Tab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N006b:Shift+Tab - [Shift+BackTab]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("N006b:Shift+Tab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("N006b:BackTab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("N006b:BackTab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("N006b:Shift+BackTab - [Shift+BackTab]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered; //XFAIL
|
QTest::newRow("N006b:Shift+BackTab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered; //XFAIL
|
||||||
QTest::newRow("N006b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
QTest::newRow("N006b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
||||||
|
|
||||||
//===========================================
|
//===========================================
|
||||||
@ -441,7 +441,7 @@ void tst_QShortcut::number_data()
|
|||||||
QTest::newRow("N:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
QTest::newRow("N:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
||||||
QTest::newRow("N:Qt::Key_aring - Text Form") << TestAccel << NoWidget << QString("") << 0 << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("N:Qt::Key_aring - Text Form") << TestAccel << NoWidget << QString("") << 0 << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("N:Qt::Key_Aring - Text Form") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+0) << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
QTest::newRow("N:Qt::Key_Aring - Text Form") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+0) << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
||||||
QTest::newRow("N:Qt::UNICODE_ACCEL + Qt::Key_K") << TestAccel << NoWidget << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << int('k') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("N:Qt::UNICODE_ACCEL + Qt::Key_K")<< TestAccel << NoWidget << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << int('k') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("N09 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
QTest::newRow("N09 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
||||||
|
|
||||||
/* Testing Multiple Sequences
|
/* Testing Multiple Sequences
|
||||||
@ -531,7 +531,7 @@ void tst_QShortcut::text_data()
|
|||||||
Qt::Key_F1 on Shift + Qt::Key_F1
|
Qt::Key_F1 on Shift + Qt::Key_F1
|
||||||
*/
|
*/
|
||||||
QTest::newRow("T004 - slot1") << SetupAccel << TriggerSlot1 << QString("Shift+F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("T004 - slot1") << SetupAccel << TriggerSlot1 << QString("Shift+F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("T004:Shift+F1 - [Shift+F1]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("T004:Shift+F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("T004:F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
QTest::newRow("T004:F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||||
QTest::newRow("T004 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
QTest::newRow("T004 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
||||||
|
|
||||||
@ -586,7 +586,7 @@ void tst_QShortcut::text_data()
|
|||||||
QTest::newRow("T:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
QTest::newRow("T:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
||||||
QTest::newRow("T:Qt::Key_aring - Text Form") << TestAccel << NoWidget << QString("") << 0 << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("T:Qt::Key_aring - Text Form") << TestAccel << NoWidget << QString("") << 0 << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("T:Qt::Key_Aring - Text Form") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+0) << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
QTest::newRow("T:Qt::Key_Aring - Text Form") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+0) << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
||||||
QTest::newRow("T:Qt::UNICODE_ACCEL + Qt::Key_K") << TestAccel << NoWidget << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << int('k') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
QTest::newRow("T:Qt::UNICODE_ACCEL + Qt::Key_K")<< TestAccel << NoWidget << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << int('k') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||||
QTest::newRow("T09 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
QTest::newRow("T09 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
|
||||||
|
|
||||||
/* Testing Multiple Sequences
|
/* Testing Multiple Sequences
|
||||||
|
@ -669,7 +669,7 @@ void tst_QWidget::cleanup()
|
|||||||
// Helper class...
|
// Helper class...
|
||||||
|
|
||||||
BezierViewer::BezierViewer( QWidget* parent)
|
BezierViewer::BezierViewer( QWidget* parent)
|
||||||
: QWidget( parent )
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
setObjectName(QLatin1String("TestWidget"));
|
setObjectName(QLatin1String("TestWidget"));
|
||||||
setWindowTitle(objectName());
|
setWindowTitle(objectName());
|
||||||
|
@ -961,8 +961,8 @@ void tst_QMenuBar::allowActiveAndDisabled()
|
|||||||
void tst_QMenuBar::check_altPress()
|
void tst_QMenuBar::check_altPress()
|
||||||
{
|
{
|
||||||
if ( !qApp->style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation) ) {
|
if ( !qApp->style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation) ) {
|
||||||
QSKIP( QString( "this is not supposed to work in the %1 style. Skipping." ).
|
QSKIP(QString( "this is not supposed to work in the %1 style. Skipping." ).
|
||||||
arg( qApp->style()->objectName() ).toLatin1());
|
arg(qApp->style()->objectName()).toLatin1());
|
||||||
}
|
}
|
||||||
|
|
||||||
QMainWindow w;
|
QMainWindow w;
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
class ContentHandler : public QXmlDefaultHandler
|
class ContentHandler : public QXmlDefaultHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ContentHandler();
|
ContentHandler();
|
||||||
|
|
||||||
// QXmlContentHandler methods
|
// QXmlContentHandler methods
|
||||||
@ -56,55 +56,55 @@ class ContentHandler : public QXmlDefaultHandler
|
|||||||
bool startElement(const QString &namespaceURI,
|
bool startElement(const QString &namespaceURI,
|
||||||
const QString &localName,
|
const QString &localName,
|
||||||
const QString &qName,
|
const QString &qName,
|
||||||
const QXmlAttributes & atts);
|
const QXmlAttributes &atts);
|
||||||
bool endElement(const QString &namespaceURI,
|
bool endElement(const QString &namespaceURI,
|
||||||
const QString &localName,
|
const QString &localName,
|
||||||
const QString &qName);
|
const QString &qName);
|
||||||
bool characters(const QString &ch);
|
bool characters(const QString &ch);
|
||||||
void setDocumentLocator(QXmlLocator *locator);
|
void setDocumentLocator(QXmlLocator *locator);
|
||||||
bool startPrefixMapping (const QString &prefix, const QString & uri);
|
bool startPrefixMapping(const QString &prefix, const QString &uri);
|
||||||
bool endPrefixMapping(const QString &prefix);
|
bool endPrefixMapping(const QString &prefix);
|
||||||
bool ignorableWhitespace (const QString & ch);
|
bool ignorableWhitespace(const QString &ch);
|
||||||
bool processingInstruction(const QString &target, const QString &data);
|
bool processingInstruction(const QString &target, const QString &data);
|
||||||
bool skippedEntity (const QString & name);
|
bool skippedEntity(const QString &name);
|
||||||
|
|
||||||
// QXmlErrorHandler methods
|
// QXmlErrorHandler methods
|
||||||
bool warning (const QXmlParseException & exception);
|
bool warning(const QXmlParseException &exception);
|
||||||
bool error (const QXmlParseException & exception);
|
bool error(const QXmlParseException &exception);
|
||||||
bool fatalError (const QXmlParseException & exception);
|
bool fatalError(const QXmlParseException &exception);
|
||||||
|
|
||||||
// QXmlDTDHandler methods
|
// QXmlDTDHandler methods
|
||||||
bool notationDecl ( const QString & name, const QString & publicId,
|
bool notationDecl(const QString &name, const QString &publicId,
|
||||||
const QString & systemId );
|
const QString &systemId);
|
||||||
bool unparsedEntityDecl ( const QString & name,
|
bool unparsedEntityDecl(const QString &name,
|
||||||
const QString & publicId,
|
const QString &publicId,
|
||||||
const QString & systemId,
|
const QString &systemId,
|
||||||
const QString & notationName );
|
const QString ¬ationName);
|
||||||
|
|
||||||
// QXmlEntityResolver methods
|
// QXmlEntityResolver methods
|
||||||
bool resolveEntity ( const QString & publicId,
|
bool resolveEntity(const QString &publicId,
|
||||||
const QString & systemId,
|
const QString &systemId,
|
||||||
QXmlInputSource *&);
|
QXmlInputSource *&);
|
||||||
|
|
||||||
// QXmlLexicalHandler methods
|
// QXmlLexicalHandler methods
|
||||||
bool startDTD ( const QString & name, const QString & publicId, const QString & systemId );
|
bool startDTD (const QString &name, const QString &publicId, const QString &systemId);
|
||||||
bool endDTD ();
|
bool endDTD();
|
||||||
bool startEntity ( const QString & name );
|
bool startEntity(const QString &name);
|
||||||
bool endEntity ( const QString & name );
|
bool endEntity(const QString &name);
|
||||||
bool startCDATA ();
|
bool startCDATA();
|
||||||
bool endCDATA ();
|
bool endCDATA();
|
||||||
bool comment ( const QString & ch );
|
bool comment(const QString &ch);
|
||||||
|
|
||||||
// QXmlDeclHandler methods
|
// QXmlDeclHandler methods
|
||||||
bool attributeDecl ( const QString & eName, const QString & aName, const QString & type, const QString & valueDefault, const QString & value );
|
bool attributeDecl(const QString &eName, const QString &aName, const QString &type, const QString &valueDefault, const QString &value);
|
||||||
bool internalEntityDecl ( const QString & name, const QString & value );
|
bool internalEntityDecl(const QString &name, const QString &value);
|
||||||
bool externalEntityDecl ( const QString & name, const QString & publicId, const QString & systemId );
|
bool externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId);
|
||||||
|
|
||||||
|
|
||||||
const QString &result() const { return m_result; }
|
const QString &result() const { return m_result; }
|
||||||
const QString &errorMsg() const { return m_error_msg; }
|
const QString &errorMsg() const { return m_error_msg; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString nestPrefix() const { return QString().fill(' ', 3*m_nest); }
|
QString nestPrefix() const { return QString().fill(' ', 3*m_nest); }
|
||||||
QString formatAttributes(const QXmlAttributes & atts);
|
QString formatAttributes(const QXmlAttributes & atts);
|
||||||
QString escapeStr(const QString &s);
|
QString escapeStr(const QString &s);
|
||||||
@ -138,7 +138,7 @@ bool ContentHandler::endDocument()
|
|||||||
bool ContentHandler::startElement(const QString &namespaceURI,
|
bool ContentHandler::startElement(const QString &namespaceURI,
|
||||||
const QString &localName,
|
const QString &localName,
|
||||||
const QString &qName,
|
const QString &qName,
|
||||||
const QXmlAttributes & atts)
|
const QXmlAttributes &atts)
|
||||||
{
|
{
|
||||||
m_result += nestPrefix();
|
m_result += nestPrefix();
|
||||||
m_result += "startElement(namespaceURI=\"" + escapeStr(namespaceURI)
|
m_result += "startElement(namespaceURI=\"" + escapeStr(namespaceURI)
|
||||||
@ -295,9 +295,9 @@ bool ContentHandler::fatalError(const QXmlParseException & exception)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ContentHandler::notationDecl ( const QString & name,
|
bool ContentHandler::notationDecl(const QString &name,
|
||||||
const QString & publicId,
|
const QString &publicId,
|
||||||
const QString & systemId )
|
const QString &systemId )
|
||||||
{
|
{
|
||||||
m_result += nestPrefix();
|
m_result += nestPrefix();
|
||||||
m_result += "notationDecl(name=\"" + escapeStr(name) + "\", publicId=\""
|
m_result += "notationDecl(name=\"" + escapeStr(name) + "\", publicId=\""
|
||||||
@ -306,10 +306,10 @@ bool ContentHandler::notationDecl ( const QString & name,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ContentHandler::unparsedEntityDecl ( const QString & name,
|
bool ContentHandler::unparsedEntityDecl(const QString &name,
|
||||||
const QString & publicId,
|
const QString &publicId,
|
||||||
const QString & systemId,
|
const QString &systemId,
|
||||||
const QString & notationName )
|
const QString ¬ationName )
|
||||||
{
|
{
|
||||||
m_result += nestPrefix();
|
m_result += nestPrefix();
|
||||||
m_result += "unparsedEntityDecl(name=\"" + escapeStr(name)
|
m_result += "unparsedEntityDecl(name=\"" + escapeStr(name)
|
||||||
@ -320,8 +320,8 @@ bool ContentHandler::unparsedEntityDecl ( const QString & name,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ContentHandler::resolveEntity(const QString & publicId,
|
bool ContentHandler::resolveEntity(const QString &publicId,
|
||||||
const QString & systemId,
|
const QString &systemId,
|
||||||
QXmlInputSource *&)
|
QXmlInputSource *&)
|
||||||
{
|
{
|
||||||
m_result += nestPrefix();
|
m_result += nestPrefix();
|
||||||
@ -388,11 +388,11 @@ bool ContentHandler::comment ( const QString & ch )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ContentHandler::attributeDecl ( const QString & eName,
|
bool ContentHandler::attributeDecl(const QString &eName,
|
||||||
const QString & aName,
|
const QString &aName,
|
||||||
const QString & type,
|
const QString &type,
|
||||||
const QString & valueDefault,
|
const QString &valueDefault,
|
||||||
const QString & value )
|
const QString &value)
|
||||||
{
|
{
|
||||||
m_result += nestPrefix();
|
m_result += nestPrefix();
|
||||||
m_result += "attributeDecl(eName=\"" + escapeStr(eName) + "\", aName=\""
|
m_result += "attributeDecl(eName=\"" + escapeStr(eName) + "\", aName=\""
|
||||||
@ -402,8 +402,8 @@ bool ContentHandler::attributeDecl ( const QString & eName,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ContentHandler::internalEntityDecl ( const QString & name,
|
bool ContentHandler::internalEntityDecl(const QString &name,
|
||||||
const QString & value )
|
const QString &value)
|
||||||
{
|
{
|
||||||
m_result += nestPrefix();
|
m_result += nestPrefix();
|
||||||
m_result += "internatlEntityDecl(name=\"" + escapeStr(name)
|
m_result += "internatlEntityDecl(name=\"" + escapeStr(name)
|
||||||
@ -411,9 +411,9 @@ bool ContentHandler::internalEntityDecl ( const QString & name,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ContentHandler::externalEntityDecl ( const QString & name,
|
bool ContentHandler::externalEntityDecl(const QString &name,
|
||||||
const QString & publicId,
|
const QString &publicId,
|
||||||
const QString & systemId )
|
const QString &systemId)
|
||||||
{
|
{
|
||||||
m_result += nestPrefix();
|
m_result += nestPrefix();
|
||||||
m_result += "externalEntityDecl(name=\"" + escapeStr(name)
|
m_result += "externalEntityDecl(name=\"" + escapeStr(name)
|
||||||
|
@ -49,7 +49,7 @@ class ContentHandler;
|
|||||||
|
|
||||||
class Parser : public QXmlSimpleReader
|
class Parser : public QXmlSimpleReader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Parser();
|
Parser();
|
||||||
~Parser();
|
~Parser();
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class Parser : public QXmlSimpleReader
|
|||||||
QString result() const;
|
QString result() const;
|
||||||
QString errorMsg() const;
|
QString errorMsg() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ContentHandler *handler;
|
ContentHandler *handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ bool Environment::cpdir(const QString &srcDir, const QString &destDir)
|
|||||||
intermediate = QFile::copy(entry.absoluteFilePath(), destFile);
|
intermediate = QFile::copy(entry.absoluteFilePath(), destFile);
|
||||||
SetFileAttributes((wchar_t*)destFile.utf16(), FILE_ATTRIBUTE_NORMAL);
|
SetFileAttributes((wchar_t*)destFile.utf16(), FILE_ATTRIBUTE_NORMAL);
|
||||||
}
|
}
|
||||||
if(!intermediate) {
|
if (!intermediate) {
|
||||||
qDebug() << "cpdir: Failure for " << entry.fileName() << entry.isDir();
|
qDebug() << "cpdir: Failure for " << entry.fileName() << entry.isDir();
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user