diff -Nru libqxt-0.6.1/.hg_archival.txt libqxt-0.6.2/.hg_archival.txt --- libqxt-0.6.1/.hg_archival.txt 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/.hg_archival.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -repo: d520d637f1e731a6944031b7d4fd6d18de48d2b2 -node: 432e18b94f3c49b718dcbd18a2f75af7b6f93cd2 -branch: 0.6 -tag: v0.6.1 -tag: v0.6.1-rc1 diff -Nru libqxt-0.6.1/.hgtags libqxt-0.6.2/.hgtags --- libqxt-0.6.1/.hgtags 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/.hgtags 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -2a45a193777b57fe2d9e58e88c30b4b616939dce 0.4 -7564717cfa4a4a41c923ead6a76c5b647221c2ef 0.2.4 -9e3b83fbcffe00243f55a15463154ba6e6bc5017 0.2.3 -b0193a2460ac0c0c3532a7802bcdd969f453ff36 0.3 -e0260fa7e8d55e54fa9d9bf3271c6270cffd6ae0 0.2.2 -f47bc65438f1bec6db6a562295b9dc0a003bc23d libqxt-0.2-2007 -2a45a193777b57fe2d9e58e88c30b4b616939dce 0.4 -0000000000000000000000000000000000000000 0.4 -b0193a2460ac0c0c3532a7802bcdd969f453ff36 0.3 -0000000000000000000000000000000000000000 0.3 -7564717cfa4a4a41c923ead6a76c5b647221c2ef 0.2.4 -0000000000000000000000000000000000000000 0.2.4 -9e3b83fbcffe00243f55a15463154ba6e6bc5017 0.2.3 -0000000000000000000000000000000000000000 0.2.3 -e0260fa7e8d55e54fa9d9bf3271c6270cffd6ae0 0.2.2 -0000000000000000000000000000000000000000 0.2.2 -f47bc65438f1bec6db6a562295b9dc0a003bc23d libqxt-0.2-2007 -0000000000000000000000000000000000000000 libqxt-0.2-2007 -f47bc65438f1bec6db6a562295b9dc0a003bc23d v0.2.0 -e0260fa7e8d55e54fa9d9bf3271c6270cffd6ae0 v0.2.2 -9e3b83fbcffe00243f55a15463154ba6e6bc5017 v0.2.3 -7564717cfa4a4a41c923ead6a76c5b647221c2ef v0.2.4 -b0193a2460ac0c0c3532a7802bcdd969f453ff36 v0.3.0 -2a45a193777b57fe2d9e58e88c30b4b616939dce v0.4.0 -d1637953ca3fc89970977e2eddb83cb3ff2bfa27 0.6 -d1637953ca3fc89970977e2eddb83cb3ff2bfa27 0.6 -0000000000000000000000000000000000000000 0.6 -a8916fe1f743c7ebc05d83d3ad24a6460915ecac v0.6 -a8916fe1f743c7ebc05d83d3ad24a6460915ecac v0.6 -0000000000000000000000000000000000000000 v0.6 -0000000000000000000000000000000000000000 0.6 -cf1c2f62ac0c8d317b197d462946b836cf4224bc 0.6 -cf1c2f62ac0c8d317b197d462946b836cf4224bc 0.6 -0000000000000000000000000000000000000000 0.6 -1834871191714d4cfd28e5f7d9ed23b876b894f9 0.6-rc1 -1834871191714d4cfd28e5f7d9ed23b876b894f9 0.6-rc1 -0000000000000000000000000000000000000000 0.6-rc1 -e9ae935db672078edd03eb4d04e68d9cda17cc71 0.6.0-rc1 -e9ae935db672078edd03eb4d04e68d9cda17cc71 0.6.0-rc1 -0000000000000000000000000000000000000000 0.6.0-rc1 -e9ae935db672078edd03eb4d04e68d9cda17cc71 v0.6.0-rc1 -70044e48ebd3fe6c0b76c7721ee252228db56844 v0.6.0-rc2 -16ad84e89c0e6504c8063ecbaa56408b071828b4 v0.6.0 diff -Nru libqxt-0.6.1/CHANGES libqxt-0.6.2/CHANGES --- libqxt-0.6.1/CHANGES 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/CHANGES 2013-06-01 15:22:28.000000000 +0000 @@ -1,7 +1,42 @@ -LibQxt 0.6.1 contains improvements and bug fixes to the 0.6.x series. For more +LibQxt 0.6.2 contains improvements and bug fixes to the 0.6.x series. For more details, see the documentation included in this package or online at http://docs.libqxt.org. +0.6.2 +----- + + * QxtWindowSystem: + - X11 implementation cleanup/overhaul + - Fixed #85 QxtWindowSystem::windowGeometry issue + * QxtSpanSlider: Improved span drawing on Mac + * QxtGlobalShortcut: + - Fixed #51 QxtGlobalShortcut doesn't send signal + - Fixed #131 QxtGlobalShortcutKey unregistered other's shortcut key by mistake + * QxtZeroconf: Fixed a bug in the custom AvahiPoll introduced by a timestamp wrap-around that accured just last week. + * QxtCrumbView: + - Don't render delegate for invalid indexes + - Remove unnecessary padding + * QxtDataStreamSignalSerializer: + - Handle incomplete length + - Added cast to eliminate a compiler warning + * QxtMailMessage: + - Fix some encoding issues, support explicit transfer encodings + - Handle lines with only one word + * QxtJSON: + - Add support for long long ints + - Handle control characters in QxtJSON::stringify + - Fix \u decoding + - Fixed a error in json parsing code. Nested arrays were incorrectly combined into one big array. + * Build system + - Various enhancements + - Fixed #130 DEPENTPATH = DEPENDPATH? + * QxtLogger: Fixed the incorrect association of log level string names to their enumerations + * QxtAbstractHttpConnector: remove request disconnected on (QHash)"requests" + * QxtWebContent: Fix comparison on size + * QxtLanguageBox: + - Fixed #124 QxtLanguageBox logic maybe bug + - Fixed #125 QxtLanguageBox improvment in logic + 0.6.1 ----- diff -Nru libqxt-0.6.1/configure libqxt-0.6.2/configure --- libqxt-0.6.1/configure 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/configure 2013-06-01 15:22:28.000000000 +0000 @@ -24,13 +24,14 @@ QXT_SOURCE_TREE=`dirname $0` QXT_SOURCE_TREE=`(cd "$QXT_SOURCE_TREE"; /bin/pwd)` QXT_BUILD_TREE=`/bin/pwd` +[ ! -d $QXT_BUILD_TREE/features ] && mkdir $QXT_BUILD_TREE/features [ ! -d $QXT_BUILD_TREE/examples ] && mkdir $QXT_BUILD_TREE/examples [ ! -d $QXT_BUILD_TREE/tests ] && mkdir $QXT_BUILD_TREE/tests # output files CONFIG_LOG=$QXT_BUILD_TREE/config.log QMAKE_CACHE=$QXT_BUILD_TREE/.qmake.cache -QXT_VARS=$QXT_BUILD_TREE/qxtvars.prf +QXT_VARS=$QXT_BUILD_TREE/features/qxtvars.prf [ -f $CONFIG_LOG ] && mv $CONFIG_LOG $CONFIG_LOG.bak [ -f $QMAKE_CACHE ] && mv $QMAKE_CACHE $QMAKE_CACHE.bak [ -f $QXT_VARS ] && mv $QXT_VARS $QXT_VARS.bak diff -Nru libqxt-0.6.1/configure.bat libqxt-0.6.2/configure.bat --- libqxt-0.6.1/configure.bat 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/configure.bat 2013-06-01 15:22:28.000000000 +0000 @@ -23,16 +23,17 @@ cd "%0\..\" SET QXT_SOURCE_TREE=%CD% cd %QXT_BUILD_TREE% -if not exist %QXT_BUILD_TREE%\examples mkdir %QXT_BUILD_TREE%\examples 2>&1 >NUL 2>&1 -if not exist %QXT_BUILD_TREE%\tests mkdir %QXT_BUILD_TREE%\tests 2>&1 >NUL 2>&1 +if not exist %QXT_BUILD_TREE%\features mkdir %QXT_BUILD_TREE%\features >NUL 2>&1 +if not exist %QXT_BUILD_TREE%\examples mkdir %QXT_BUILD_TREE%\examples >NUL 2>&1 +if not exist %QXT_BUILD_TREE%\tests mkdir %QXT_BUILD_TREE%\tests >NUL 2>&1 @rem -- output files set CONFIG_LOG=%QXT_BUILD_TREE%\config.log set QMAKE_CACHE=%QXT_BUILD_TREE%\.qmake.cache -set QXT_VARS=%QXT_BUILD_TREE%\qxtvars.prf +set QXT_VARS=%QXT_BUILD_TREE%\features\qxtvars.prf if exist %CONFIG_LOG% move %CONFIG_LOG% %CONFIG_LOG%.bak >NUL 2>&1 if exist %QMAKE_CACHE% move %QMAKE_CACHE% %QMAKE_CACHE%.bak >NUL 2>&1 -if exist %QXT_VARS% move %QXT_VARS% %QXT_VARS%.bak 2>&1 >NUL 2>&1 +if exist %QXT_VARS% move %QXT_VARS% %QXT_VARS%.bak >NUL 2>&1 @rem -- defaults echo CONFIG += silent > %QMAKE_CACHE% diff -Nru libqxt-0.6.1/debian/changelog libqxt-0.6.2/debian/changelog --- libqxt-0.6.1/debian/changelog 2013-11-01 23:41:26.000000000 +0000 +++ libqxt-0.6.2/debian/changelog 2013-12-04 20:46:20.000000000 +0000 @@ -1,8 +1,12 @@ -libqxt (0.6.1-7build1) trusty; urgency=low +libqxt (0.6.2-1) unstable; urgency=low - * No change rebuild against db 5.3. + * New upstream release. + * Update the debian/watch file. Thanks to Bart Martens. + * Remove deprecated DM-Upload-Allowed field in debian/control file. + * Bump Standards-Version to 3.9.4. + * Refresh patch: fix-forbidden-rpath-build-config.patch. - -- Dmitrijs Ledkovs Fri, 01 Nov 2013 23:41:26 +0000 + -- Thomas Pierson Wed, 04 Dec 2013 21:45:30 +0100 libqxt (0.6.1-7) unstable; urgency=low diff -Nru libqxt-0.6.1/debian/control libqxt-0.6.2/debian/control --- libqxt-0.6.1/debian/control 2013-11-01 23:41:26.000000000 +0000 +++ libqxt-0.6.2/debian/control 2013-11-10 11:16:04.000000000 +0000 @@ -1,8 +1,6 @@ Source: libqxt Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Thomas Pierson -DM-Upload-Allowed: yes +Maintainer: Thomas Pierson Build-Depends: debhelper (>= 8.1.3~), autotools-dev, libqt4-dev (>= 4:4.8.0~), @@ -10,7 +8,7 @@ libx11-dev, libavahi-compat-libdnssd-dev, qt4-dev-tools -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 Section: libs Homepage: http://dev.libqxt.org/libqxt/wiki/Home Vcs-Git: git://thomaspierson.fr/pkg-libqxt.git diff -Nru libqxt-0.6.1/debian/patches/fix-forbidden-rpath-build-config libqxt-0.6.2/debian/patches/fix-forbidden-rpath-build-config --- libqxt-0.6.1/debian/patches/fix-forbidden-rpath-build-config 2012-09-18 18:29:27.000000000 +0000 +++ libqxt-0.6.2/debian/patches/fix-forbidden-rpath-build-config 2013-11-10 14:50:47.000000000 +0000 @@ -4,14 +4,14 @@ . So I simply remove this behavior in src/qxtlibs.pri file. This patch has no side effect. -Author: Thomas PIERSON -Last-Update: 2011-03-23 +Author: Thomas Pierson +Last-Update: 2013-11-10 --- a/src/qxtlibs.pri +++ b/src/qxtlibs.pri @@ -1,6 +1,5 @@ INCLUDEPATH += $${QXT_SOURCE_TREE}/include DEPENDPATH += $${QXT_SOURCE_TREE}/include --unix:!macx:LIBS += -Wl,-rpath,$${QXT_BUILD_TREE}/lib +-QMAKE_RPATHDIR += $${QXT_BUILD_TREE}/lib macx:LIBS += -F$${QXT_BUILD_TREE}/lib LIBS += -L$${QXT_BUILD_TREE}/lib diff -Nru libqxt-0.6.1/debian/watch libqxt-0.6.2/debian/watch --- libqxt-0.6.1/debian/watch 2012-09-18 18:29:27.000000000 +0000 +++ libqxt-0.6.2/debian/watch 2013-11-10 11:16:04.000000000 +0000 @@ -1,2 +1,3 @@ version=3 -http://dev.libqxt.org/libqxt/get/v(.*)\.tar\.gz +http://dev.libqxt.org/libqxt/wiki/Home .*/libqxt/get/v(\d.*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) + diff -Nru libqxt-0.6.1/doc/src/qxt.qdocconf libqxt-0.6.2/doc/src/qxt.qdocconf --- libqxt-0.6.1/doc/src/qxt.qdocconf 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/doc/src/qxt.qdocconf 2013-06-01 15:22:28.000000000 +0000 @@ -1,21 +1,21 @@ project = Qxt description = Qxt Reference Documentation -url = http://doc.libqxt.org/0.6.1 +url = http://doc.libqxt.org/0.6.2 language = Cpp modules = QxtBerkeley QxtCore QxtGui QxtNetwork QxtSql QxtWeb QxtZeroconf qhp.projects = Qxt qhp.Qxt.file = qxt.qhp -qhp.Qxt.namespace = org.libqxt.060 +qhp.Qxt.namespace = org.libqxt.062 qhp.Qxt.virtualFolder = qdoc qhp.Qxt.indexTitle = Qxt Reference Documentation qhp.Qxt.indexRoot = qhp.Qxt.extraFiles = stylesheet.css -qhp.Qxt.filterAttributes = qxt 0.6.1 qxtrefdoc -qhp.Qxt.customFilters.Qxt.name = Qxt 0.6.1 -qhp.Qxt.customFilters.Qxt.filterAttributes = qxt 0.6.1 +qhp.Qxt.filterAttributes = qxt 0.6.2 qxtrefdoc +qhp.Qxt.customFilters.Qxt.name = Qxt 0.6.2 +qhp.Qxt.customFilters.Qxt.filterAttributes = qxt 0.6.2 qhp.Qxt.subprojects = classes overviews examples qhp.Qxt.subprojects.classes.title = Classes qhp.Qxt.subprojects.classes.indexTitle = Qxt's Classes @@ -97,8 +97,8 @@ HTML.footer = "


\n" \ "\n" \ - "\n" \ "\n" \ + "Qxt 0.6.2\n" \ "
Copyright © 2007-2010\n" \ + "Copyright © 2007-2011\n" \ "Qxt Foundation
\n" \ - "Qxt 0.6.1
" diff -Nru libqxt-0.6.1/features/qxt.prf libqxt-0.6.2/features/qxt.prf --- libqxt-0.6.1/features/qxt.prf 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/features/qxt.prf 2013-06-01 15:22:28.000000000 +0000 @@ -3,11 +3,7 @@ DEPENDPATH += $${QXT_INSTALL_HEADERS} INCLUDEPATH += $${QXT_INSTALL_HEADERS} -unix:!macx{ - QXTQMAKERPATH=$${QMAKE_RPATH} - isEmpty(QXTQMAKERPATH):QXTQMAKERPATH=-Wl,-rpath, - LIBS += $${QXTQMAKERPATH}$${QXT_INSTALL_LIBS} -} +QMAKE_RPATHDIR += $${QXT_INSTALL_LIBS} macx:LIBS += -F$${QXT_INSTALL_LIBS} LIBS += -L$${QXT_INSTALL_LIBS} diff -Nru libqxt-0.6.1/libqxt.pro libqxt-0.6.2/libqxt.pro --- libqxt-0.6.1/libqxt.pro 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/libqxt.pro 2013-06-01 15:22:28.000000000 +0000 @@ -76,7 +76,7 @@ } features.path = $$QXT_INSTALL_FEATURES -features.files = $$QXT_SOURCE_TREE/features/qxt.prf $$QXT_BUILD_TREE/qxtvars.prf +features.files = $$QXT_SOURCE_TREE/features/qxt.prf $$QXT_BUILD_TREE/features/qxtvars.prf INSTALLS += features style.CONFIG = recursive diff -Nru libqxt-0.6.1/src/core/qxtcsvmodel.cpp libqxt-0.6.2/src/core/qxtcsvmodel.cpp --- libqxt-0.6.1/src/core/qxtcsvmodel.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/core/qxtcsvmodel.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -321,7 +321,7 @@ bool QxtCsvModel::insertColumns(int col, int count, const QModelIndex& parent) { if (parent != QModelIndex() || col < 0) return false; - emit beginInsertColumns(parent, col, col + count); + beginInsertColumns(parent, col, col + count - 1); QxtCsvModelPrivate& d_ptr = qxt_d(); if (col < columnCount()) { @@ -339,7 +339,7 @@ for (int i = 0;i < count;i++) d_ptr.header.insert(col, ""); d_ptr.maxColumn += count; - emit endInsertColumns(); + endInsertColumns(); return true; } diff -Nru libqxt-0.6.1/src/core/qxtdatastreamsignalserializer.cpp libqxt-0.6.2/src/core/qxtdatastreamsignalserializer.cpp --- libqxt-0.6.1/src/core/qxtdatastreamsignalserializer.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/core/qxtdatastreamsignalserializer.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -88,7 +88,8 @@ bool QxtDataStreamSignalSerializer::canDeserialize(const QByteArray& buffer) const { - int headerLen = qFromLittleEndian(reinterpret_cast(buffer.constData())); - int bodyLen = quint32(buffer.length() - 4); + if(buffer.length() < int(sizeof(quint32))) return false; + quint32 headerLen = qFromLittleEndian(reinterpret_cast(buffer.constData())); + quint32 bodyLen = quint32(buffer.length() - 4); return headerLen <= bodyLen; } diff -Nru libqxt-0.6.1/src/core/qxtglobal.h libqxt-0.6.2/src/core/qxtglobal.h --- libqxt-0.6.1/src/core/qxtglobal.h 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/core/qxtglobal.h 2013-06-01 15:22:28.000000000 +0000 @@ -28,8 +28,8 @@ #include -#define QXT_VERSION 0x000601 -#define QXT_VERSION_STR "0.6.1" +#define QXT_VERSION 0x000602 +#define QXT_VERSION_STR "0.6.2" //--------------------------global macros------------------------------ diff -Nru libqxt-0.6.1/src/core/qxtjson.cpp libqxt-0.6.2/src/core/qxtjson.cpp --- libqxt-0.6.1/src/core/qxtjson.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/core/qxtjson.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -59,7 +59,29 @@ } int t = v.type(); if (t == QVariant::String){ - return "\""+v.toString()+"\""; + QString in = v.toString(); + QString out; + for(QString::ConstIterator i = in.constBegin(); i != in.constEnd(); i++){ + if( (*i) == QChar('\b')) + out.append("\\b"); + else if( (*i) == QChar('\f')) + out.append("\\f"); + else if( (*i) == QChar('\n')) + out.append("\\n"); + else if( (*i) == QChar('\r')) + out.append("\\r"); + else if( (*i) == QChar('\t')) + out.append("\\t"); + else if( (*i) == QChar('\f')) + out.append("\\f"); + else if( (*i) == QChar('\\')) + out.append("\\\\"); + else if( (*i) == QChar('/')) + out.append("\\/"); + else + out.append(*i); + } + return "\""+out+"\""; } else if (t == QVariant::Bool){ return v.toBool()?"true":"false"; @@ -218,13 +240,13 @@ return l; } else if (c==','){ } else if (c=='"'){ - l.append(parseString(s,error)); + l.append(QVariant(parseString(s,error))); } else if (c=='['){ - l.append(parseArray(s,error)); + l.append(QVariant(parseArray(s,error))); } else if (c=='{'){ - l.append(parseObject(s,error)); + l.append(QVariant(parseObject(s,error))); } else { - l.append(parseLiteral(s,error)); + l.append(QVariant(parseLiteral(s,error))); } s.skipWhiteSpace(); } @@ -253,9 +275,15 @@ }else if(c=='f'){ str.append('\f'); }else if(c=='u'){ - short u; - s>>u; - str.append(QChar(u)); + QString k; + for (int i = 0; i < 4; i++ ) { + s >> c; + k.append(c); + } + bool ok; + int i = k.toInt(&ok, 16); + if (ok) + str.append(QChar(i)); }else{ str.append(c); } @@ -296,10 +324,13 @@ s>>c; } s.seek(s.pos()-1); - if(n.contains('.')){ + if(n.contains('.')) { return n.toDouble(); - }else{ - return n.toInt(); + } else { + bool ok = false; + int result = n.toInt(&ok); + if(ok) return result; + return n.toLongLong(); } } } diff -Nru libqxt-0.6.1/src/core/qxtlogger.cpp libqxt-0.6.2/src/core/qxtlogger.cpp --- libqxt-0.6.1/src/core/qxtlogger.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/core/qxtlogger.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -683,14 +683,14 @@ QxtLogger::LogLevel QxtLogger::stringToLogLevel(const QString& level) { if (level.toLower() == "alllevels") return QxtLogger::AllLevels; - else if (level.toLower() == "writelevel") return QxtLogger::TraceLevel; - else if (level.toLower() == "fatallevel") return QxtLogger::DebugLevel; - else if (level.toLower() == "criticallevel") return QxtLogger::InfoLevel; - else if (level.toLower() == "errorlevel") return QxtLogger::WarningLevel; - else if (level.toLower() == "warnlevel") return QxtLogger::ErrorLevel; - else if (level.toLower() == "infolevel") return QxtLogger::CriticalLevel; - else if (level.toLower() == "debuglevel") return QxtLogger::FatalLevel; - else if (level.toLower() == "tracelevel") return QxtLogger::WriteLevel; + else if (level.toLower() == "writelevel") return QxtLogger::WriteLevel; + else if (level.toLower() == "fatallevel") return QxtLogger::FatalLevel; + else if (level.toLower() == "criticallevel") return QxtLogger::CriticalLevel; + else if (level.toLower() == "errorlevel") return QxtLogger::ErrorLevel; + else if (level.toLower() == "warnlevel") return QxtLogger::WarningLevel; + else if (level.toLower() == "infolevel") return QxtLogger::InfoLevel; + else if (level.toLower() == "debuglevel") return QxtLogger::DebugLevel; + else if (level.toLower() == "tracelevel") return QxtLogger::TraceLevel; else return QxtLogger::NoLevels; } diff -Nru libqxt-0.6.1/src/gui/qxtcrumbview.cpp libqxt-0.6.2/src/gui/qxtcrumbview.cpp --- libqxt-0.6.1/src/gui/qxtcrumbview.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/gui/qxtcrumbview.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -132,11 +132,13 @@ } int border = painter.style()->pixelMetric(QStyle::PM_DefaultFrameWidth); option.rect = option.rect.adjusted(border, border, -border, -border); - QAbstractItemDelegate* delegate = static_cast(parent())->crumbDelegate(); - QStyleOptionViewItem itemOption; - itemOption.initFrom(this); - itemOption.rect = option.rect; - delegate->paint(&painter, itemOption, index); + if(index.isValid()) { + QAbstractItemDelegate* delegate = static_cast(parent())->crumbDelegate(); + QStyleOptionViewItem itemOption; + itemOption.initFrom(this); + itemOption.rect = option.rect; + delegate->paint(&painter, itemOption, index); + } int arrow = 8; int pad = (height() - (2 * border) - arrow) / 2; QStyleOption arrowOption; @@ -172,7 +174,9 @@ viewport()->setBackgroundRole(QPalette::Window); setFrameStyle(QFrame::NoFrame); QVBoxLayout* layout = new QVBoxLayout(this); + layout->setContentsMargins(0, 0, 0, 0); qxt_d().buttonLayout = new QHBoxLayout; + qxt_d().buttonLayout->setContentsMargins(0, 0, 0, 0); qxt_d().buttonLayout->setSpacing(0); qxt_d().buttonLayout->addStretch(1); QToolButton* backButton = new QToolButton(this); diff -Nru libqxt-0.6.1/src/gui/qxtglobalshortcut.cpp libqxt-0.6.2/src/gui/qxtglobalshortcut.cpp --- libqxt-0.6.1/src/gui/qxtglobalshortcut.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/gui/qxtglobalshortcut.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -58,19 +58,23 @@ const quint32 nativeKey = nativeKeycode(key); const quint32 nativeMods = nativeModifiers(mods); const bool res = registerShortcut(nativeKey, nativeMods); - shortcuts.insert(qMakePair(nativeKey, nativeMods), &qxt_p()); - if (!res) + if (res) + shortcuts.insert(qMakePair(nativeKey, nativeMods), &qxt_p()); + else qWarning() << "QxtGlobalShortcut failed to register:" << QKeySequence(key + mods).toString(); return res; } bool QxtGlobalShortcutPrivate::unsetShortcut() { + bool res = false; const quint32 nativeKey = nativeKeycode(key); const quint32 nativeMods = nativeModifiers(mods); - const bool res = unregisterShortcut(nativeKey, nativeMods); - shortcuts.remove(qMakePair(nativeKey, nativeMods)); - if (!res) + if (shortcuts.value(qMakePair(nativeKey, nativeMods)) == &qxt_p()) + res = unregisterShortcut(nativeKey, nativeMods); + if (res) + shortcuts.remove(qMakePair(nativeKey, nativeMods)); + else qWarning() << "QxtGlobalShortcut failed to unregister:" << QKeySequence(key + mods).toString(); key = Qt::Key(0); mods = Qt::KeyboardModifiers(0); diff -Nru libqxt-0.6.1/src/gui/qxtglobalshortcut_mac.cpp libqxt-0.6.2/src/gui/qxtglobalshortcut_mac.cpp --- libqxt-0.6.1/src/gui/qxtglobalshortcut_mac.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/gui/qxtglobalshortcut_mac.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -53,7 +53,7 @@ { quint32 native = 0; if (modifiers & Qt::ShiftModifier) - native |= shiftKeyBit; + native |= shiftKey; if (modifiers & Qt::ControlModifier) native |= cmdKey; if (modifiers & Qt::AltModifier) diff -Nru libqxt-0.6.1/src/gui/qxtlanguagecombobox.cpp libqxt-0.6.2/src/gui/qxtlanguagecombobox.cpp --- libqxt-0.6.1/src/gui/qxtlanguagecombobox.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/gui/qxtlanguagecombobox.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -27,6 +27,7 @@ #include "qxtlanguagecombobox_p.h" #include #include +#include class Language; typedef QList LanguageList; @@ -36,7 +37,7 @@ { QDir dir(pathToTranslations); QStringList fileNames = dir.entryList(QStringList("*.qm"), QDir::Files, QDir::Name); - + QSet found; QMutableStringListIterator i(fileNames); while (i.hasNext()) { @@ -44,8 +45,11 @@ int start = i.value().indexOf('_'); int end = i.value().lastIndexOf('.'); QString s = i.value().mid(start + 1, end - start - 1).toLower(); - - i.setValue(s); + if (found.contains(s)) + { + i.setValue(s); + found.insert(s); + } } return fileNames; @@ -266,11 +270,12 @@ QModelIndex start = _mModel->index(0, 1); QModelIndexList result = _mModel->match(start, Qt::DisplayRole, language, 1, Qt::MatchExactly); if (!result.isEmpty()) + { qxt_p().setCurrentIndex(result.first().row()); + handleLanguageChange(); + } // else // qDebug() << "Cannot setCurrentLanguage: " << language << _mModel; - - handleLanguageChange(); } /*! diff -Nru libqxt-0.6.1/src/gui/qxtspanslider.cpp libqxt-0.6.2/src/gui/qxtspanslider.cpp --- libqxt-0.6.1/src/gui/qxtspanslider.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/gui/qxtspanslider.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -702,16 +702,12 @@ Q_UNUSED(event); QStylePainter painter(this); - // ticks + // groove & ticks QStyleOptionSlider opt; qxt_d().initStyleOption(&opt); - opt.subControls = QStyle::SC_SliderTickmarks; - painter.drawComplexControl(QStyle::CC_Slider, opt); - - // groove opt.sliderValue = 0; opt.sliderPosition = 0; - opt.subControls = QStyle::SC_SliderGroove; + opt.subControls = QStyle::SC_SliderGroove | QStyle::SC_SliderTickmarks; painter.drawComplexControl(QStyle::CC_Slider, opt); // handle rects @@ -725,7 +721,7 @@ // span const int minv = qMin(lrv, urv); const int maxv = qMax(lrv, urv); - const QPoint c = style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderGroove, this).center(); + const QPoint c = QRect(lr.center(), ur.center()).center(); QRect spanRect; if (orientation() == Qt::Horizontal) spanRect = QRect(QPoint(minv, c.y() - 2), QPoint(maxv, c.y() + 1)); diff -Nru libqxt-0.6.1/src/gui/qxtwindowsystem_x11.cpp libqxt-0.6.2/src/gui/qxtwindowsystem_x11.cpp --- libqxt-0.6.1/src/gui/qxtwindowsystem_x11.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/gui/qxtwindowsystem_x11.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -27,24 +27,25 @@ #include #include -static void qxt_getWindowProperty(Window wid, Atom prop, int maxlen, Window** data, int* count) +static WindowList qxt_getWindows(Atom prop) { + WindowList res; Atom type = 0; int format = 0; - unsigned long after = 0; - XGetWindowProperty(QX11Info::display(), wid, prop, 0, maxlen / 4, False, AnyPropertyType, - &type, &format, (unsigned long*) count, &after, (unsigned char**) data); -} - -static QRect qxt_getWindowRect(Window wid) -{ - QRect rect; - XWindowAttributes attr; - if (XGetWindowAttributes(QX11Info::display(), wid, &attr)) - { - rect = QRect(attr.x, attr.y, attr.width, attr.height); + uchar* data = 0; + ulong count, after; + Display* display = QX11Info::display(); + Window window = QX11Info::appRootWindow(); + if (XGetWindowProperty(display, window, prop, 0, 1024 * sizeof(Window) / 4, False, AnyPropertyType, + &type, &format, &count, &after, &data) == Success) + { + Window* list = reinterpret_cast(data); + for (uint i = 0; i < count; ++i) + res += list[i]; + if (data) + XFree(data); } - return rect; + return res; } WindowList QxtWindowSystem::windows() @@ -53,31 +54,23 @@ if (!net_clients) net_clients = XInternAtom(QX11Info::display(), "_NET_CLIENT_LIST_STACKING", True); - int count = 0; - Window* list = 0; - qxt_getWindowProperty(QX11Info::appRootWindow(), net_clients, 1024 * sizeof(Window), &list, &count); - - WindowList res; - for (int i = 0; i < count; ++i) - res += list[i]; - XFree(list); - return res; + return qxt_getWindows(net_clients); } WId QxtWindowSystem::activeWindow() { - Window focus; - int revert = 0; - Display* display = QX11Info::display(); - XGetInputFocus(display, &focus, &revert); - return focus; + static Atom net_active = 0; + if (!net_active) + net_active = XInternAtom(QX11Info::display(), "_NET_ACTIVE_WINDOW", True); + + return qxt_getWindows(net_active).value(0); } WId QxtWindowSystem::findWindow(const QString& title) { Window result = 0; WindowList list = windows(); - foreach(const Window &wid, list) + foreach (const Window &wid, list) { if (windowTitle(wid) == title) { @@ -109,34 +102,41 @@ QString name; char* str = 0; if (XFetchName(QX11Info::display(), window, &str)) - { name = QString::fromLatin1(str); - } - XFree(str); + if (str) + XFree(str); return name; } QRect QxtWindowSystem::windowGeometry(WId window) { - QRect rect = qxt_getWindowRect(window); - - Window root = 0; - Window parent = 0; - Window* children = 0; - unsigned int count = 0; + int x, y; + uint width, height, border, depth; + Window root, child; Display* display = QX11Info::display(); - if (XQueryTree(display, window, &root, &parent, &children, &count)) + XGetGeometry(display, window, &root, &x, &y, &width, &height, &border, &depth); + XTranslateCoordinates(display, window, root, x, y, &x, &y, &child); + + static Atom net_frame = 0; + if (!net_frame) + net_frame = XInternAtom(QX11Info::display(), "_NET_FRAME_EXTENTS", True); + + QRect rect(x, y, width, height); + Atom type = 0; + int format = 0; + uchar* data = 0; + ulong count, after; + if (XGetWindowProperty(display, window, net_frame, 0, 4, False, AnyPropertyType, + &type, &format, &count, &after, &data) == Success) { - window = parent; // exclude decoration - XFree(children); - while (window != 0 && XQueryTree(display, window, &root, &parent, &children, &count)) + // _NET_FRAME_EXTENTS, left, right, top, bottom, CARDINAL[4]/32 + if (count == 4) { - XWindowAttributes attr; - if (parent != 0 && XGetWindowAttributes(display, parent, &attr)) - rect.translate(QRect(attr.x, attr.y, attr.width, attr.height).topLeft()); - window = parent; - XFree(children); + long* extents = reinterpret_cast(data); + rect.adjust(-extents[0], -extents[2], extents[1], extents[3]); } + if (data) + XFree(data); } return rect; } @@ -176,7 +176,8 @@ Qt::HANDLE rootWindow = QX11Info::appRootWindow(screen); _xScreenSaverQueryInfo(QX11Info::display(), (Drawable*) rootWindow, info); idle = info->idle; - XFree(info); + if (info) + XFree(info); } return idle; } diff -Nru libqxt-0.6.1/src/network/qxtmailmessage.cpp libqxt-0.6.2/src/network/qxtmailmessage.cpp --- libqxt-0.6.1/src/network/qxtmailmessage.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/network/qxtmailmessage.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -251,7 +251,7 @@ { if (line.length() > 72) { - rv += line + "?\n\r"; + rv += line + "?\r\n"; line = " =?utf-8?b?"; } line = line + base64.mid(i, 4); @@ -265,7 +265,7 @@ { if (line.length() > 73) { - rv += line + "?\n\r"; + rv += line + "?\r\n"; line = " =?utf-8?q?"; } if (QXT_MUST_QP(utf8[i]) || utf8[i] == ' ') @@ -285,9 +285,14 @@ QByteArray QxtMailMessage::rfc2822() const { + // Use quoted-printable if requested + bool useQuotedPrintable = (extraHeader("Content-Transfer-Encoding").toLower() == "quoted-printable"); + // Use base64 if requested + bool useBase64 = (extraHeader("Content-Transfer-Encoding").toLower() == "base64"); + // Check to see if plain text is ASCII-clean; assume it isn't if QP or base64 was requested QTextCodec* latin1 = QTextCodec::codecForName("latin1"); - bool bodyIsAscii = latin1->canEncode(body()); - bool useQuotedPrintable = false; + bool bodyIsAscii = latin1->canEncode(body()) && !useQuotedPrintable && !useBase64; + QHash attach = attachments(); QByteArray rv; @@ -315,11 +320,11 @@ { if (!hasExtraHeader("MIME-Version") && !attach.count()) rv += "MIME-Version: 1.0\r\n"; - if (hasExtraHeader("Content-Transfer-Encoding")) - { - useQuotedPrintable = (extraHeader("Content-Transfer-Encoding").toLower() == "quoted-printable"); - } - else + + // If no transfer encoding has been requested, guess. + // Heuristic: If >20% of the first 100 characters aren't + // 7-bit clean, use base64, otherwise use Q-P. + if(!bodyIsAscii && !useQuotedPrintable && !useBase64) { QString b = body(); int nonAscii = 0; @@ -329,6 +334,7 @@ if (QXT_MUST_QP(b[i])) nonAscii++; } useQuotedPrintable = !(nonAscii > 20); + useBase64 = !useQuotedPrintable; } } @@ -406,30 +412,33 @@ { if (b[i] == '\n' || b[i] == '\r') { - if (line.length() + word.length() + 1 <= 78) + if (line.isEmpty()) + { + line = word; + word = ""; + } + else if (line.length() + word.length() + 1 <= 78) { line = line + ' ' + word; word = ""; } - if (line == ".") - rv += "..\r\n"; - else - rv += line + "\r\n"; + if(line[0] == '.') + rv += "."; + rv += line + "\r\n"; if ((b[i+1] == '\n' || b[i+1] == '\r') && b[i] != b[i+1]) { // If we're looking at a CRLF pair, skip the second half i++; } - line = ""; + line = word; } else if (b[i] == ' ') { if (line.length() + word.length() + 1 > 78) { - if (line == ".") - rv += "..\r\n"; - else - rv += line + "\r\n"; + if(line[0] == '.') + rv += "."; + rv += line + "\r\n"; line = word; } else if (line.isEmpty()) @@ -449,20 +458,20 @@ } if (line.length() + word.length() + 1 > 78) { - if (line == ".") - rv += "..\r\n"; - else - rv += line + "\r\n"; + if(line[0] == '.') + rv += "."; + rv += line + "\r\n"; line = word; } else if (!word.isEmpty()) { line += ' ' + word; } - if (line == ".") - rv += "..\r\n"; - else if (!line.isEmpty()) + if(!line.isEmpty()) { + if(line[0] == '.') + rv += "."; rv += line + "\r\n"; + } } else if (useQuotedPrintable) { @@ -471,9 +480,21 @@ QByteArray line; for (int i = 0; i < ct; i++) { - if (line.length() > 74) + if(b[i] == '\n' || b[i] == '\r') { - rv += line + "\n\r"; + if(line[0] == '.') + rv += "."; + rv += line + "\r\n"; + line = ""; + if ((b[i+1] == '\n' || b[i+1] == '\r') && b[i] != b[i+1]) + { + // If we're looking at a CRLF pair, skip the second half + i++; + } + } + else if (line.length() > 74) + { + rv += line + "=\r\n"; line = ""; } if (QXT_MUST_QP(b[i])) @@ -485,6 +506,11 @@ line += b[i]; } } + if(!line.isEmpty()) { + if(line[0] == '.') + rv += "."; + rv += line + "\r\n"; + } } else /* base64 */ { @@ -492,7 +518,7 @@ int ct = b.length(); for (int i = 0; i < ct; i += 78) { - rv += b.mid(i, 78); + rv += b.mid(i, 78) + "\r\n"; } } diff -Nru libqxt-0.6.1/src/qxtbase.pri libqxt-0.6.2/src/qxtbase.pri --- libqxt-0.6.1/src/qxtbase.pri 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/qxtbase.pri 2013-06-01 15:22:28.000000000 +0000 @@ -1,5 +1,5 @@ TEMPLATE = lib -!win32:VERSION = 0.6.1 +!win32:VERSION = 0.6.2 DESTDIR = $${QXT_BUILD_TREE}/lib win32:DLLDESTDIR = $${QXT_BUILD_TREE}/bin target.path = $${QXT_INSTALL_LIBS} @@ -36,7 +36,7 @@ include(qxtlibs.pri) macx { - CONFIG += absolute_library_soname + CONFIG(qt_no_framework): CONFIG += absolute_library_soname CONFIG(qt_framework, qt_framework|qt_no_framework): CONFIG += lib_bundle FRAMEWORK_HEADERS.version = Versions FRAMEWORK_HEADERS.files = $${HEADERS} diff -Nru libqxt-0.6.1/src/qxtlibs.pri libqxt-0.6.2/src/qxtlibs.pri --- libqxt-0.6.1/src/qxtlibs.pri 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/qxtlibs.pri 2013-06-01 15:22:28.000000000 +0000 @@ -1,6 +1,6 @@ INCLUDEPATH += $${QXT_SOURCE_TREE}/include DEPENDPATH += $${QXT_SOURCE_TREE}/include -unix:!macx:LIBS += -Wl,-rpath,$${QXT_BUILD_TREE}/lib +QMAKE_RPATHDIR += $${QXT_BUILD_TREE}/lib macx:LIBS += -F$${QXT_BUILD_TREE}/lib LIBS += -L$${QXT_BUILD_TREE}/lib @@ -8,7 +8,7 @@ INCLUDEPATH += $${QXT_SOURCE_TREE}/src/$$1 INCLUDEPATH += $${QXT_SOURCE_TREE}/include/$$2 DEPENDPATH += $${QXT_SOURCE_TREE}/src/$$1 - DEPENTPATH += $${QXT_SOURCE_TREE}/include/$$2 + DEPENDPATH += $${QXT_SOURCE_TREE}/include/$$2 qtAddLibrary($$2) } diff -Nru libqxt-0.6.1/src/web/qxtabstracthttpconnector.cpp libqxt-0.6.2/src/web/qxtabstracthttpconnector.cpp --- libqxt-0.6.1/src/web/qxtabstracthttpconnector.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/web/qxtabstracthttpconnector.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -75,6 +75,12 @@ return nextRequestID; } + inline void doneWithBuffer(QIODevice* device) + { + QWriteLocker locker(&bufferLock); + buffers.remove(device); + } + inline void doneWithRequest(quint32 requestID) { QWriteLocker locker(&requestLock); @@ -184,10 +190,13 @@ */ void QxtAbstractHttpConnector::disconnected() { + quint32 requestID=0; QIODevice* device = qobject_cast(sender()); if (!device) return; - QWriteLocker locker(&qxt_d().bufferLock); - qxt_d().buffers.remove(device); + + requestID = qxt_d().requests.key(device); + qxt_d().doneWithRequest(requestID); + qxt_d().doneWithBuffer(device); sessionManager()->disconnected(device); } diff -Nru libqxt-0.6.1/src/web/qxtwebcontent.cpp libqxt-0.6.2/src/web/qxtwebcontent.cpp --- libqxt-0.6.1/src/web/qxtwebcontent.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/web/qxtwebcontent.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -150,7 +150,7 @@ maxSize -= sz; qxt_d().start.clear(); } - else if (sz > 0 && sz > maxSize) + else if (sz > 0 && sz >= maxSize) { memcpy(writePtr, qxt_d().start.constData(), maxSize); qxt_d().start = qxt_d().start.mid(maxSize); diff -Nru libqxt-0.6.1/src/zeroconf/qxtavahipoll.cpp libqxt-0.6.2/src/zeroconf/qxtavahipoll.cpp --- libqxt-0.6.1/src/zeroconf/qxtavahipoll.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/src/zeroconf/qxtavahipoll.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -192,7 +192,7 @@ _timer.stop(); return; } - int msecs = (avahi_age(tv)) / 1000; + qint64 msecs = (avahi_age(tv)) / 1000; if (msecs > 0) msecs = 0; else diff -Nru libqxt-0.6.1/tests/other/app/mainwindow.cpp libqxt-0.6.2/tests/other/app/mainwindow.cpp --- libqxt-0.6.1/tests/other/app/mainwindow.cpp 2010-12-14 21:31:43.000000000 +0000 +++ libqxt-0.6.2/tests/other/app/mainwindow.cpp 2013-06-01 15:22:28.000000000 +0000 @@ -35,7 +35,7 @@ QxtGlobalShortcut* shortcut = new QxtGlobalShortcut(this); connect(shortcut, SIGNAL(activated()), this, SLOT(toggleVisibility())); - QKeySequence key("Ctrl+Alt+S"); + QKeySequence key("Ctrl+Shift+Alt+S"); if (shortcut->setShortcut(key)) ui.labelVisibility->setText(ui.labelVisibility->text().arg(key.toString(QKeySequence::NativeText))); else