summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QPA menu abstraction, originally based on Morten's workJames Turner2012-05-1916-191/+348
| | | | | | | | | | Create a QPA abstraction for native menus, derived from the Cocoa support in 4.8, but with the expectation to support other platforms too. Update the QtWidget QMenu and QMenuBar code to maintain their QPA equivalents if they exist. Change-Id: Id605de3da8811dc832bf48b35f9107778ad320ff Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix QtNetwork compilation for -qconfig largeTasuku Suzuki2012-05-195-3/+8
| | | | | Change-Id: I231272e59101e9492a7a1edbacab165b96927877 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Adding QPlatformTheme support for Blackberry devices.Sean Harmer2012-05-197-2/+306
| | | | | | | | Starting off simple with fonts that follow the Playbook guidelines. Change-Id: If772f9a20c5e7566543be6bba47b49cdf3bf1524 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QNX: Special case z-ordering of the QDesktopWidget windowSean Harmer2012-05-191-1/+11
| | | | | | | | | | | | | | | | | The assumption that window creation order implies correct initial z-ordering is broken when dealing with certain window types. In this commit we special case the QDesktopWidget's window which maybe created after normal application windows yet still need to be layered below them. Without this fix we may accidentaly activate the Desktop window when the blackberry navigator service sends an event to activate the window group. That results in broken focus handling. Change-Id: I42dfde2efb4a0011e37e7bd2e7c5442590606a24 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Compile fix: Do not rely on __cpuidex() for msvc2008Jan-Arve Saether2012-05-191-4/+5
| | | | | | | | | | | | | | | Since its hard to detect if __cpuidex() is actually available at compile time, we'll add a function overload that will be chosen if the intrinsic __cpuidex() is not available. Note that the QtXgetbvHack that was used for _xgetbv did not really work (MS compiler will bail out because of ambiguous overloads if the intrinsic _xgetbv existed). Therefore, we apply the same workaround for _xgetbv. Change-Id: Iee3bf8bc6352ba0861b05d779f1f001d4eb013ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegExp: fix usage of uninitialized valuesGiuseppe D'Angelo2012-05-191-1/+1
| | | | | | | | | | | | | | | | | | A (probable) typo was causing the code dealing with anchors to use uninitialized values. This used to work by chance, but was indeed detected by Valgrind f.i. when running tst_qregexp -- the indexIn test on anc11 data reported: ==3015== Conditional jump or move depends on uninitialised value(s) ==3015== at 0x514B4EA: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1813) [...] ==3015== Uninitialised value was created by a stack allocation ==3015== at 0x514B3EB: PeppeQt::QRegExpMatchState::testAnchor(int, int, int const*) (qregexp.cpp:1803) Fixing the code also makes the aforementioned test to succeed. Change-Id: If7b3e518c1bbfcf12573d2637c33ef2eca27c4d5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Don't use the deprecated translate() method anymoreLars Knoll2012-05-181-5/+0
| | | | | | | | | | The Encoding argument of QCoreApplication::translate() is deprecated and source code is always assumed to be encoded in Utf8. Simply remove the encoding argument from the generated .ui.h files. Change-Id: If6c40f6df13abd45a0303c863077972c3d1fb685 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QIcon metatype handlers back to QtGuiOlivier Goffart2012-05-187-72/+51
| | | | | | | | | | | QIcon has been moved back from QWidget to QtGui, so the QIcon QVariant and QMetaType handler can now be moved back to QtGui. Also we can give back QIcon its old number, allowing to get rid of some compatibility hack when unstreaming QVariant Change-Id: I439d5c2987c06ecd619f394407850f678164afb8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* QIcon: move back to QtGuiOlivier Goffart2012-05-1828-64/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the files and tests git mv src/widgets/kernel/qicon* qrc/gui/image/ git mv tests/auto/widgets/kernel/qicon/ tests/auto/gui/image/ - update the include of QIcon git grep -O"sed -i s,QtWidgets/qicon,QtGui/qicon," "QtWidgets/qicon" git grep -O"sed -i s,QtWidgets/QIcon,QtGui/QIcon," "QtWidgets/QIcon" - Adapt QIcon \ingroup documentation sed -i s/QtWidgets/QtGui/ src/gui/images/qicon* - Adapt export macro sed -i s/Q_WIDGETS_EXPORT/Q_GUI_EXPORT/g src/gui/image/qicon* - Update .pri and .pro files - Remove the use of QStyle::alignedRect by copying its content (and adapt slightly - Use QGuiApplication::palette() instead of QApplication::palette() - Add a hook in QGuiApplicationPrivate to call the QStyle::generatedIconPixmap() from QtWidgets Another commit follows to adjust QMetaType::Icon and move the QVariant and QMetaType icon handler back in QtGui Change-Id: I1b63759f892ebc02dfc30f41bb6e76e0b7451182 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Make QCoreApp::translate and related methods use UTF-8Lars Knoll2012-05-185-67/+37
| | | | | | | | | Deprecate the Encoding enum in QCoreApplication and the trUtf8() methods. Qt now assumes that source code is always encoded in UTF-8 to be consistent with QString. Change-Id: Ic62d6947046dee9be0cbd37f2d2f6976b9e572a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QMetaType API directly instead of going through QVariant.Jędrzej Nowacki2012-05-181-4/+4
| | | | | | Change-Id: I418ccca7cb6e2aa1ba678e24dd36b39ebecadcbe Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix backingstore crash with QAxWidgetsMiikka Heikkinen2012-05-182-5/+4
| | | | | | | | | | | | | | The crash was caused by the fact that backingStore parameter is always null (there seems to be no call in codebase that uses anything else but the default values for this function). Using "store" member variable instead of "backingStore" parameter gets rid of the crash, and it is how it was in Qt4 - probably the bug crept in when the paremeter and member variables were renamed in Qt5. Task-number: QTBUG-25803 Change-Id: I4b1ccf540fddd6baa1dffa7f8165272b54caf238 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: hooks can never be nullGirish Ramakrishnan2012-05-181-8/+4
| | | | | | | | | | e60ca0de6015a8ee16c7be54d0d430252ef525c1 reworked the hooks design. hooks is initialized with a stub pointer if we don't have a platform hook. Change-Id: Ia60facfebd9e4d9c08d237c6d49793efb598130f Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: Add support for cursor hotspotsGirish Ramakrishnan2012-05-184-14/+69
| | | | | | | | | Cursor information is now loaded from cursor.json. Done-with: Johannes Zellner Change-Id: I093cf8e944d495269973e777d0b444ae4ececee1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* qdoc: Report multiple QML property docssMartin Smith2012-05-183-20/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | Documentation authors sometimes make the mistake of documenting a QML property more than once. Here, we refer to cases where a C++ class is documented in a .cpp file as a QML type. In this context one QML property might be documented in two qdoc comments, because the author of the second comment does not search the file for an existing qdoc comment for the property before adding the second one. When DITA XML is generated for this case, the QML type element will contain two <qmlproperty> elements with identical id attributes, which is invalid XML. id attributes must be unique within an XML document. qdoc now reports an error for this case, indicating that the QMLN property has been documented multiple times. This problem can't occur when documenting QML in a .qml file because in .qml files, each comment must appear directly above the thing it applies to. Change-Id: I3a22650a58371fbda2ac7a5429fc036f41750423 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Merge two simple version of translate() functions for QT_NO_TRANSLATIONTasuku Suzuki2012-05-181-13/+0
| | | | | | | | the commit 53a420a4d1a2d845603dd85ce9ce345c6819088e merged translate() functions. The simple versions need to be merged too. Change-Id: Ie873483beb8ed0b911ae0568e97b427f4c6b74e3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Make the windows socket handle non inheritableShane Kearns2012-05-181-1/+23
| | | | | | | | | | | | This is for behaviour consistency with Qt on unix, as well as the socket close issues described in the task. Task-number: QTBUG-4465 Change-Id: Ida95650d8a9bd7b5bc3d3926d22e20a6d7eeb30b Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix FreeType glyph caching for high resolutionJiang Jiang2012-05-182-21/+25
| | | | | | | | | | | | | | | | | | | | For high resolution or extremely large font sizes, the advance cached here is likely to overflow, since FreeType returns 26.6 fixed point value and we only take signed char here for advance. In those cases we should skip caching because there won't be that many big glyphs after all. Also move the metrics caching block a bit down to take glyph embolden and oblique into account. As a result we also don't need to increase the linearAdvance size because any linearAdvance less than 128 should fit in the old 10.6 fixed format. Change-Id: Ic4920ada49954ce1e0a8673c9f33f30e385e3046 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* QMetaObject::activate() overload that doesn't require a metaobjectAaron Kennedy2012-05-182-0/+8
| | | | | | | | | This allows QML to emit signals without having to built lazily created metaobjects. Change-Id: If8068fb3cb35d79dc8f3ef79253d9c2eb7c93205 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Avoid qobject_castAaron Kennedy2012-05-181-1/+2
| | | | | | | | | This is slightly faster, and also avoids accessing the object's meta object that would cause any lazily created meta objects from being built. Change-Id: I0a78e09511c120bdbe707a1efc91ba480ab7680c Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Encapsulate the dynamic meta object pointerAaron Kennedy2012-05-185-13/+28
| | | | | | | | | This change allows us to delay creating the actual meta object until it is actually required. Change-Id: I1c4a4226bd82fa606b206dd60322f49b49c32463 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Clean up some QT_HAVE_xxx macros in qcompilerdetection.hThiago Macieira2012-05-182-12/+3
| | | | | | | | | | | | | | We no longer have code doing MMX or 3dNow! on Qt 5, so nothing defines those macros. If nothing defines them, we don't need to undef them. Note that the SSE case is a mislabel: the old "SSE" code on Qt 4 wasn't real SSE, it was MMX with some instructions added at the same time as SSE was added. It's MMX that Windows 64 doesn't support. As for QT_HAVE_ARMV6, this macro is replaced by the sub-arch detection in qprocessordetection.h. Change-Id: Ic3b00e1533e6b4cea32ba7824233de0a5c0fb32b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* testlib: added missing newline to error messageRohan McGovern2012-05-171-1/+1
| | | | | Change-Id: I8b205da4d225d99f8505a46d8d78ad302cb2b9e3 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* add some more widely-used QChar::SpecialCharacter enum valuesKonstantin Ritt2012-05-173-2/+10
| | | | | | Change-Id: Iad58f4366ba6cd6da29a268c56c8a4bc4cf0329c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* eglfs: Allow cursor atlas to be specified using an env variableGirish Ramakrishnan2012-05-171-1/+4
| | | | | | | | The atlas it assumed to have 8 cursors per row. All cursors have to be square. Change-Id: I7ffbad4662be450b146f84032bb26187894d528f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: delete cursor textures in the destructorGirish Ramakrishnan2012-05-171-1/+7
| | | | | Change-Id: I7e86313134c428bacda41f5e5401ebc392ceecd8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: remove multiple references to qeglfshooks.h in HEADERSGirish Ramakrishnan2012-05-171-1/+0
| | | | | | | ce2b46daea5815df1070463b6bc379e1b4573dae introduced the mistake. Change-Id: Ifbd276dc24138dfb771d0cb14cb5d18dfa7beb2d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove src/widgets/kernel/x11.pri.Robin Burchell2012-05-172-5/+0
| | | | | | | | | | | | | | Presumably, this was set for QSound, which has since moved to QtMultimedia (and no longer uses nas, anyway). Configure also no longer seems to have logic for setting nas, as of 4535913c4fb908293f8f1667eff480efc3fadd73. Change-Id: Ie5b351844bd169ad0548b0d29513adbf6f5d9a12 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* turn off exceptions by default where they aren't requiredLars Knoll2012-05-176-8/+9
| | | | | | | | | | | | | This significantly reduces the size of the generated code in places where we don't need exceptions. The -(no-)exceptions configure flag has been removed in the process, as there is now a fine grained way to control this on a per module level, and Qt is being compiled without exceptions in most places. Change-Id: I99a15c5d03339db1fbffd4987935d0d671cdbc32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix cursorToX for right to left text with trailing whitespace.Andrew den Exter2012-05-172-15/+9
| | | | | | | | | | | | | | | | QTextLine::cursorToX returned the line width for cursor positions outside the width of a wrapped right to left line because the leading space width was always calculated as 0. Returning a non-zero width for the leading space does cause problems for other uses of QTextEngine::alignLine() though as the textAdvance already doesn't include the leading/trailing space so subtracting it there double accounts for it. Task-number: QTBUG-24801 Change-Id: I56cbb139814c32813bebb49de8c045b29154a958 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* QDoc: Generate correct relative paths and links when using -installdir.Casper van Donderen2012-05-162-6/+9
| | | | | | | | This change will generate working links between all modules in qtbase. Some testing needs to be done on the other modules. Change-Id: Ic65a9c753f891ac51427ca7c1cdcab13611d2f5b Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Fix bug when destruction fields in QWizardCarl Schumann2012-05-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain the consistency of QWizardPrivate's two members: QVector<QWizardField> fields; QMap<QString, int> fieldIndexMap; during and after calls to QWizardPrivate's void _q_handleFieldObjectDestroyed(QObject *) member function. The failure to maintain this consistency caused an out of bounds access and core dump in QWizard's field(const QString &name) member function. QWizard's field(const QString &name) member function expects the values in the QMap fieldIndexMap to be indexes into the QVector fields. Prior to this change _q_handleFieldObjectDestroyed only removed the appropriate entry from the map and erased it from the vector. It did not decrement by one all the indexes greater than the index that was removed from the map and erased from the vector in the rest of the map. For example ... So if initially have the following mapping ... "field0" -> 0, "field1" -> 1, and "field2" -> 2 with fields of size 3. After destruction of "field1" have ... "field0" -> 0, and "field2" -> 2 with fields of size 2. Now attempts to look up "field2" using QWizard::field will have an out of bounds error and possibly core dump or trigger an internal Qt assert because an attempt to access this->fields[2] will be made. It should be accessing this->fields[1], but does not because the map is no longer consistent with the vector. This change adds a decrement by one for all the indexes greater than the index that was removed from the map and erased from the vector. Task-number: QTBUG-25691 Change-Id: Ia2a41027628a65faec4ecdd5da235ddd19746a57 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* enable the text layout's cache where it is seems to be missedKonstantin Ritt2012-05-163-0/+3
| | | | | | | | | | | e.g. in QStaticText, the data is used just to get the line's y-position and re-calculates just after the loop to determine the bounding rect and to draw the text; in QWidgetLineControl, the data re-calculated over and over while the result is seems to remain the same; probably the caching is needed here too Change-Id: I0f7eb291532f63eccb9c5f749daebb73ff90632f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* qdoc: Include QML type name in method quidMartin Smith2012-05-162-6/+6
| | | | | | | | | | | | A case was found where a method inherited from a QML type marked abstract had the same name as a method in the inheriting class, and these two methods received the same quid. This was fixed by including the QML type name in the guid for QML methods. Change-Id: I110eb254b3c6be014cb67fdc5b57b5aa2f575220 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Add header qtest_widgets.h, similar to qtest_gui.h, but for QApplication.David Faure2012-05-161-0/+61
| | | | | | | | | | | | The current alternative is to define QT_WIDGETS_LIB before including qtest.h, but this is not convenient/intuitive when using other build systems than qmake. If one forgets the define, crashes happen when using QApplication-related code. Use <QTestWidgets> in one of the widgets autotests, for testing. Change-Id: Id96be4976723aea3e8a28c9d0d594daab25a6d90 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Populate the font database when calling fallbacksForFamily().Zeno Albisser2012-05-161-0/+2
| | | | | | | | The Mac platform requires populating the font database to build the fallback list for font families. Change-Id: I5bd63cd3c5fa6216c312d439390681f160a716fb Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add focusWindowChanged signal to QGuiApplicationJames Turner2012-05-162-0/+10
| | | | | | | | Required for Cocoa platform menus support, we need a way to update state after focusWindow() result changes. Change-Id: Idc573888c3d75bcbff2252e243c4b57b15fc2fcd Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Handle EglDisplay and EglContext in the native interface of eglfs.Samuel Rødal2012-05-163-1/+39
| | | | | Change-Id: I793176204f12eea9d915fb7fe489bd3450a283cd Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Add eglfs cursor supportGirish Ramakrishnan2012-05-169-1/+381
| | | | | | | | cursor-atlas.png was generated from existing cursor images (qttools/src/shared/qtpropertybrowser/images/) Change-Id: Ic4b396590eaec93e14a4b0915b15f735f5b1a5f5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QCoreApplication: No longer hardcode arguments to be filtered out.Friedemann Kleint2012-05-162-29/+40
| | | | | | | | | | | | On Windows, Unicode command line arguments are re-created from the original command line filtering out the known arguments. To avoid having to hard-code all arguments of derived application classes, keep the original argv-array and use that to verify if an argument is still present. Task-number: QTBUG-25724 Change-Id: I5d7bbd9530b1b74e1dcd22a0edc4f323ef687d23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct a mistake about non-characters in the documentation.Thiago Macieira2012-05-161-2/+2
| | | | | | | | | | | The Unicode non-characters are 32 characters, from U+FDD0 to U+FDEF. The code matching these comments was fixed in 9327bc87c3abf58bb471693b5448cd78e3db1b46, but the comment wasn't fixed. Change-Id: I5bde0ab9d70c1c6623893de36d31235cbd9fb152 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* qdoc: Fix some QString usage issues (Krazy warnings).Friedemann Kleint2012-05-1617-94/+94
| | | | | | | | - Avoid single-character constants. - Use QString() instead of "". Change-Id: If04eff389e7b6d4a18201365b711708fdf545d00 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc: Fix warnings about unused variables.Friedemann Kleint2012-05-162-5/+5
| | | | | Change-Id: I2052da55022334362efb5765335f00692f4c65fa Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove duplicate include for the macros.Stephen Kelly2012-05-161-2/+0
| | | | | | | | The basic config file includes the macros file already if needed. Change-Id: I8b03360ce1e9fff4a3be5270f659dbe22fc1b295 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Properly quote all variables which are paths.Stephen Kelly2012-05-162-5/+5
| | | | | | | | This is required if Qt is installed into a directory with spaces. Change-Id: I1d6874265558d712ac98a3aef670c2934a632ab1 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add a non-implicit copy constructor to QEventThiago Macieira2012-05-162-0/+43
| | | | | | | | | | | | | | | | | | | | | Copying events is a bad idea but it is permitted, used at least in the state machine framework and QApplication, which somehow found it amusing to clone events. We can't forbid it because it would be source-incompatible with Qt 4, and other ill-advised developer may be doing this. In the new copy functions and in the destructor, ensure that the d pointer is null. We can't copy it if it isn't. The exception is for DeferredDelete events, which use the d pointer to store the loop level count. Such value must not be deleted. In the future, if QEvent::d is used at the QEvent level, make sure to adapt QCoreApplication::postEvent to store the counter somewhere else. Task-number: QTBUG-25070 Change-Id: I1f2d3f3cfc891ec216df2e8b7dbe531524d21b26 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Avoid using iconv for text conversion where possibleLars Knoll2012-05-164-43/+44
| | | | | | | | | | | | Try to use a builtin codec as codecForLocale() if possible first. Fall back and instantiate the iconv codec only if that failed. In addition, make sure we initialize the locale correctly before we try to setup the codec. Change-Id: I86d635f9d11e8ff93093f162e79fb37f3d85731b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Limit the nesting depth of the Json parserLars Knoll2012-05-163-4/+47
| | | | | | | | | | | | | | | The parser is recursive and too deeply nested json would cause it to exhaust the available stack space leading to crashes. We now abort parsing with a DeepNesting parse error if the document is too deeply nested. The current nesting limit is set to 1024, which should be more then enough for any real JSON data set. Change-Id: I4adea3fd727149f7342536d73cf4530361a0a3a1 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* QElfParser: double check section size before using it.Arvid E. Picciani2012-05-161-1/+1
| | | | | | | | | In rare cases, if the section is empty, we're reading the whole object into memory because size -1 = UINT_MAX. Change-Id: Ibf9a1534159ce626e4f2327536076d0cc1ebf0ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* MIPS DSPR2 optimization of routine fetchUntransformedRGB16Damir Tatalovic2012-05-163-0/+92
| | | | | | | Change-Id: I109deb969009214c4d81677e127f50120443acd2 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>