Skip to content

Instantly share code, notes, and snippets.

@AntonyoHutsona
Last active October 24, 2015 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntonyoHutsona/986db93ce5cdafc8ad0b to your computer and use it in GitHub Desktop.
Save AntonyoHutsona/986db93ce5cdafc8ad0b to your computer and use it in GitHub Desktop.
* Package: dev-qt/qtcore-5.5.1
* Repository: x-portage
* USE: abi_x86_64 amd64 elibc_glibc icu kernel_linux userland_GNU
* FEATURES: preserve-libs sandbox usersandbox
>>> Compiling source in /var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1 ...
* Running emake in src/tools/bootstrap
make -j4
make: Nothing to be done for 'first'.
* Running emake in src/tools/moc
make -j4
make: Nothing to be done for 'first'.
* Running emake in src/tools/rcc
make -j4
make: Nothing to be done for 'first'.
* Running emake in src/corelib
make -j4
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qabstractanimation.o animation/qabstractanimation.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qvariantanimation.o animation/qvariantanimation.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qpropertyanimation.o animation/qpropertyanimation.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qanimationgroup.o animation/qanimationgroup.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qsequentialanimationgroup.o animation/qsequentialanimationgroup.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qparallelanimationgroup.o animation/qparallelanimationgroup.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qpauseanimation.o animation/qpauseanimation.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qbuffer.o io/qbuffer.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qprocess.o io/qprocess.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qfilesystemwatcher.o io/qfilesystemwatcher.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qfileselector.o io/qfileselector.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qabstractproxymodel.o itemmodels/qabstractproxymodel.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qitemselectionmodel.o itemmodels/qitemselectionmodel.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qidentityproxymodel.o itemmodels/qidentityproxymodel.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qsortfilterproxymodel.o itemmodels/qsortfilterproxymodel.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qobject.o kernel/qobject.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qsignalmapper.o kernel/qsignalmapper.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qtimer.o kernel/qtimer.cpp
/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/bin/moc -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/mkspecs/linux-g++ -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/src/corelib -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/include -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/include/QtCore -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/include/QtCore/5.5.1 -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/include/QtCore/5.5.1/QtCore -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/src/corelib/global -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/src/3rdparty/harfbuzz/src -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/src/3rdparty/md5 -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/src/3rdparty/md4 -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/src/3rdparty/sha3 -I/var/calculate/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/src/3rdparty/forkfd -I/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4 -I/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/x86_64-pc-linux-gnu -I/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/backward -I/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include -I/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include-fixed -I/usr/include statemachine/qstatemachine.cpp -o .moc/qstatemachine.moc
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qmimetype.o mimetypes/qmimetype.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qmimeglobpattern.o mimetypes/qmimeglobpattern.cpp
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qmimeprovider.o mimetypes/qmimeprovider.cpp
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h:35:0,
from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h:148,
from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/ext/atomicity.h:35,
from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/basic_string.h:39,
from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/string:52,
from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/random:40,
from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/bits/stl_algo.h:66,
from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/algorithm:62,
from ../../include/QtCore/../../src/corelib/global/qglobal.h:85,
from ../../include/QtCore/qglobal.h:1,
from mimetypes/qmimetype.h:38,
from mimetypes/qmimetype.cpp:35:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/ext/concurrence.h:122:34: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘short int’ in initialization
__gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT;
^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4/ext/concurrence.h:177:44: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘short int’ in initialization
__gthread_recursive_mutex_t _M_mutex = __GTHREAD_RECURSIVE_MUTEX_INIT;
^
x86_64-pc-linux-gnu-g++ -c -O3 -march=native -pipe -std=gnu++14 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.5.1 -I../../include/QtCore/5.5.1/QtCore -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/forkfd -I.moc -I../../mkspecs/linux-g++ -o .obj/qxmlstream.o xml/qxmlstream.cpp
Makefile:36243: recipe for target '.obj/qmimetype.o' failed
make: *** [.obj/qmimetype.o] Error 1
make: *** Waiting for unfinished jobs....
// Support for concurrent programing -*- C++ -*-
// Copyright (C) 2003-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file ext/concurrence.h
* This file is a GNU extension to the Standard C++ Library.
*/
#ifndef _CONCURRENCE_H
#define _CONCURRENCE_H 1
#pragma GCC system_header
#include <exception>
#include <bits/gthr.h>
#include <bits/functexcept.h>
#include <bits/cpp_type_traits.h>
#include <ext/type_traits.h>
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
// Available locking policies:
// _S_single single-threaded code that doesn't need to be locked.
// _S_mutex multi-threaded code that requires additional support
// from gthr.h or abstraction layers in concurrence.h.
// _S_atomic multi-threaded code using atomic operations.
enum _Lock_policy { _S_single, _S_mutex, _S_atomic };
// Compile time constant that indicates prefered locking policy in
// the current configuration.
static const _Lock_policy __default_lock_policy =
#ifdef __GTHREADS
#if (defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) \
&& defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4))
_S_atomic;
#else
_S_mutex;
#endif
#else
_S_single;
#endif
// NB: As this is used in libsupc++, need to only depend on
// exception. No stdexception classes, no use of std::string.
class __concurrence_lock_error : public std::exception
{
public:
virtual char const*
what() const throw()
{ return "__gnu_cxx::__concurrence_lock_error"; }
};
class __concurrence_unlock_error : public std::exception
{
public:
virtual char const*
what() const throw()
{ return "__gnu_cxx::__concurrence_unlock_error"; }
};
class __concurrence_broadcast_error : public std::exception
{
public:
virtual char const*
what() const throw()
{ return "__gnu_cxx::__concurrence_broadcast_error"; }
};
class __concurrence_wait_error : public std::exception
{
public:
virtual char const*
what() const throw()
{ return "__gnu_cxx::__concurrence_wait_error"; }
};
// Substitute for concurrence_error object in the case of -fno-exceptions.
inline void
__throw_concurrence_lock_error()
{ _GLIBCXX_THROW_OR_ABORT(__concurrence_lock_error()); }
inline void
__throw_concurrence_unlock_error()
{ _GLIBCXX_THROW_OR_ABORT(__concurrence_unlock_error()); }
#ifdef __GTHREAD_HAS_COND
inline void
__throw_concurrence_broadcast_error()
{ _GLIBCXX_THROW_OR_ABORT(__concurrence_broadcast_error()); }
inline void
__throw_concurrence_wait_error()
{ _GLIBCXX_THROW_OR_ABORT(__concurrence_wait_error()); }
#endif
class __mutex
{
private:
#if __GTHREADS && defined __GTHREAD_MUTEX_INIT
__gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT;
#else
__gthread_mutex_t _M_mutex;
#endif
__mutex(const __mutex&);
__mutex& operator=(const __mutex&);
public:
__mutex()
{
#if __GTHREADS && ! defined __GTHREAD_MUTEX_INIT
if (__gthread_active_p())
__GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
#endif
}
#if __GTHREADS && ! defined __GTHREAD_MUTEX_INIT
~__mutex()
{
if (__gthread_active_p())
__gthread_mutex_destroy(&_M_mutex);
}
#endif
void lock()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_mutex_lock(&_M_mutex) != 0)
__throw_concurrence_lock_error();
}
#endif
}
void unlock()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_mutex_unlock(&_M_mutex) != 0)
__throw_concurrence_unlock_error();
}
#endif
}
__gthread_mutex_t* gthread_mutex(void)
{ return &_M_mutex; }
};
class __recursive_mutex
{
private:
#if __GTHREADS && defined __GTHREAD_RECURSIVE_MUTEX_INIT
__gthread_recursive_mutex_t _M_mutex = __GTHREAD_RECURSIVE_MUTEX_INIT;
#else
__gthread_recursive_mutex_t _M_mutex;
#endif
__recursive_mutex(const __recursive_mutex&);
__recursive_mutex& operator=(const __recursive_mutex&);
public:
__recursive_mutex()
{
#if __GTHREADS && ! defined __GTHREAD_RECURSIVE_MUTEX_INIT
if (__gthread_active_p())
__GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex);
#endif
}
#if __GTHREADS && ! defined __GTHREAD_RECURSIVE_MUTEX_INIT
~__recursive_mutex()
{
if (__gthread_active_p())
__gthread_recursive_mutex_destroy(&_M_mutex);
}
#endif
void lock()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_recursive_mutex_lock(&_M_mutex) != 0)
__throw_concurrence_lock_error();
}
#endif
}
void unlock()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0)
__throw_concurrence_unlock_error();
}
#endif
}
__gthread_recursive_mutex_t* gthread_recursive_mutex(void)
{ return &_M_mutex; }
};
/// Scoped lock idiom.
// Acquire the mutex here with a constructor call, then release with
// the destructor call in accordance with RAII style.
class __scoped_lock
{
public:
typedef __mutex __mutex_type;
private:
__mutex_type& _M_device;
__scoped_lock(const __scoped_lock&);
__scoped_lock& operator=(const __scoped_lock&);
public:
explicit __scoped_lock(__mutex_type& __name) : _M_device(__name)
{ _M_device.lock(); }
~__scoped_lock() throw()
{ _M_device.unlock(); }
};
#ifdef __GTHREAD_HAS_COND
class __cond
{
private:
#if __GTHREADS && defined __GTHREAD_COND_INIT
__gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
#else
__gthread_cond_t _M_cond;
#endif
__cond(const __cond&);
__cond& operator=(const __cond&);
public:
__cond()
{
#if __GTHREADS && ! defined __GTHREAD_COND_INIT
if (__gthread_active_p())
__GTHREAD_COND_INIT_FUNCTION(&_M_cond);
#endif
}
#if __GTHREADS && ! defined __GTHREAD_COND_INIT
~__cond()
{
if (__gthread_active_p())
__gthread_cond_destroy(&_M_cond);
}
#endif
void broadcast()
{
#if __GTHREADS
if (__gthread_active_p())
{
if (__gthread_cond_broadcast(&_M_cond) != 0)
__throw_concurrence_broadcast_error();
}
#endif
}
void wait(__mutex *mutex)
{
#if __GTHREADS
{
if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0)
__throw_concurrence_wait_error();
}
#endif
}
void wait_recursive(__recursive_mutex *mutex)
{
#if __GTHREADS
{
if (__gthread_cond_wait_recursive(&_M_cond,
mutex->gthread_recursive_mutex())
!= 0)
__throw_concurrence_wait_error();
}
#endif
}
};
#endif
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
#endif
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2015 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmimetype.h"
#ifndef QT_NO_MIMETYPE
#include "qmimetype_p.h"
#include "qmimedatabase_p.h"
#include "qmimeprovider_p.h"
#include "qmimeglobpattern_p.h"
#include <QtCore/QDebug>
#include <QtCore/QLocale>
#include <memory>
QT_BEGIN_NAMESPACE
QMimeTypePrivate::QMimeTypePrivate()
: loaded(false)
{}
QMimeTypePrivate::QMimeTypePrivate(const QMimeType &other)
: loaded(other.d->loaded),
name(other.d->name),
localeComments(other.d->localeComments),
genericIconName(other.d->genericIconName),
iconName(other.d->iconName),
globPatterns(other.d->globPatterns)
{}
void QMimeTypePrivate::clear()
{
name.clear();
localeComments.clear();
genericIconName.clear();
iconName.clear();
globPatterns.clear();
loaded = false;
}
void QMimeTypePrivate::addGlobPattern(const QString &pattern)
{
globPatterns.append(pattern);
}
/*!
\class QMimeType
\inmodule QtCore
\ingroup shared
\brief The QMimeType class describes types of file or data, represented by a MIME type string.
\since 5.0
For instance a file named "readme.txt" has the MIME type "text/plain".
The MIME type can be determined from the file name, or from the file
contents, or from both. MIME type determination can also be done on
buffers of data not coming from files.
Determining the MIME type of a file can be useful to make sure your
application supports it. It is also useful in file-manager-like applications
or widgets, in order to display an appropriate \l {QMimeType::iconName}{icon} for the file, or even
the descriptive \l {QMimeType::comment()}{comment} in detailed views.
To check if a file has the expected MIME type, you should use inherits()
rather than a simple string comparison based on the name(). This is because
MIME types can inherit from each other: for instance a C source file is
a specific type of plain text file, so text/x-csrc inherits text/plain.
\sa QMimeDatabase
*/
/*!
\fn QMimeType &QMimeType::operator=(QMimeType &&other)
Move-assigns \a other to this QMimeType instance.
\since 5.2
*/
/*!
\fn QMimeType::QMimeType();
Constructs this QMimeType object initialized with default property values that indicate an invalid MIME type.
*/
QMimeType::QMimeType() :
d(new QMimeTypePrivate())
{
}
/*!
\fn QMimeType::QMimeType(const QMimeType &other);
Constructs this QMimeType object as a copy of \a other.
*/
QMimeType::QMimeType(const QMimeType &other) :
d(other.d)
{
}
/*!
\fn QMimeType &QMimeType::operator=(const QMimeType &other);
Assigns the data of \a other to this QMimeType object, and returns a reference to this object.
*/
QMimeType &QMimeType::operator=(const QMimeType &other)
{
if (d != other.d)
d = other.d;
return *this;
}
/*!
\fn QMimeType::QMimeType(const QMimeTypePrivate &dd);
Assigns the data of the QMimeTypePrivate \a dd to this QMimeType object, and returns a reference to this object.
\internal
*/
QMimeType::QMimeType(const QMimeTypePrivate &dd) :
d(new QMimeTypePrivate(dd))
{
}
/*!
\fn void QMimeType::swap(QMimeType &other);
Swaps QMimeType \a other with this QMimeType object.
This operation is very fast and never fails.
The swap() method helps with the implementation of assignment
operators in an exception-safe way. For more information consult
\l {http://en.wikibooks.org/wiki/More_C++_Idioms/Copy-and-swap}
{More C++ Idioms - Copy-and-swap}.
*/
/*!
\fn QMimeType::~QMimeType();
Destroys the QMimeType object, and releases the d pointer.
*/
QMimeType::~QMimeType()
{
}
/*!
\fn bool QMimeType::operator==(const QMimeType &other) const;
Returns \c true if \a other equals this QMimeType object, otherwise returns \c false.
The name is the unique identifier for a mimetype, so two mimetypes with
the same name, are equal.
*/
bool QMimeType::operator==(const QMimeType &other) const
{
return d == other.d || d->name == other.d->name;
}
/*!
\fn bool QMimeType::operator!=(const QMimeType &other) const;
Returns \c true if \a other does not equal this QMimeType object, otherwise returns \c false.
*/
/*!
\fn bool QMimeType::isValid() const;
Returns \c true if the QMimeType object contains valid data, otherwise returns \c false.
A valid MIME type has a non-empty name().
The invalid MIME type is the default-constructed QMimeType.
*/
bool QMimeType::isValid() const
{
return !d->name.isEmpty();
}
/*!
\fn bool QMimeType::isDefault() const;
Returns \c true if this MIME type is the default MIME type which
applies to all files: application/octet-stream.
*/
bool QMimeType::isDefault() const
{
return d->name == QMimeDatabasePrivate::instance()->defaultMimeType();
}
/*!
\fn QString QMimeType::name() const;
Returns the name of the MIME type.
*/
QString QMimeType::name() const
{
return d->name;
}
/*!
Returns the description of the MIME type to be displayed on user interfaces.
The system language (QLocale::system().name()) is used to select the appropriate translation.
*/
QString QMimeType::comment() const
{
QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d);
QStringList languageList;
languageList << QLocale::system().name();
languageList << QLocale::system().uiLanguages();
Q_FOREACH (const QString &language, languageList) {
const QString lang = language == QLatin1String("C") ? QLatin1String("en_US") : language;
const QString comm = d->localeComments.value(lang);
if (!comm.isEmpty())
return comm;
const int pos = lang.indexOf(QLatin1Char('_'));
if (pos != -1) {
// "pt_BR" not found? try just "pt"
const QString shortLang = lang.left(pos);
const QString commShort = d->localeComments.value(shortLang);
if (!commShort.isEmpty())
return commShort;
}
}
// Use the mimetype name as fallback
return d->name;
}
/*!
\fn QString QMimeType::genericIconName() const;
Returns the file name of a generic icon that represents the MIME type.
This should be used if the icon returned by iconName() cannot be found on
the system. It is used for categories of similar types (like spreadsheets
or archives) that can use a common icon.
The freedesktop.org Icon Naming Specification lists a set of such icon names.
The icon name can be given to QIcon::fromTheme() in order to load the icon.
*/
QString QMimeType::genericIconName() const
{
QMimeDatabasePrivate::instance()->provider()->loadGenericIcon(*d);
if (d->genericIconName.isEmpty()) {
// From the spec:
// If the generic icon name is empty (not specified by the mimetype definition)
// then the mimetype is used to generate the generic icon by using the top-level
// media type (e.g. "video" in "video/ogg") and appending "-x-generic"
// (i.e. "video-x-generic" in the previous example).
QString group = name();
const int slashindex = group.indexOf(QLatin1Char('/'));
if (slashindex != -1)
group = group.left(slashindex);
return group + QLatin1String("-x-generic");
}
return d->genericIconName;
}
/*!
\fn QString QMimeType::iconName() const;
Returns the file name of an icon image that represents the MIME type.
The icon name can be given to QIcon::fromTheme() in order to load the icon.
*/
QString QMimeType::iconName() const
{
QMimeDatabasePrivate::instance()->provider()->loadIcon(*d);
if (d->iconName.isEmpty()) {
// Make default icon name from the mimetype name
d->iconName = name();
const int slashindex = d->iconName.indexOf(QLatin1Char('/'));
if (slashindex != -1)
d->iconName[slashindex] = QLatin1Char('-');
}
return d->iconName;
}
/*!
\fn QStringList QMimeType::globPatterns() const;
Returns the list of glob matching patterns.
*/
QStringList QMimeType::globPatterns() const
{
QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d);
return d->globPatterns;
}
/*!
A type is a subclass of another type if any instance of the first type is
also an instance of the second. For example, all image/svg+xml files are also
text/xml, text/plain and application/octet-stream files. Subclassing is about
the format, rather than the category of the data (for example, there is no
'generic spreadsheet' class that all spreadsheets inherit from).
Conversely, the parent mimetype of image/svg+xml is text/xml.
A mimetype can have multiple parents. For instance application/x-perl
has two parents: application/x-executable and text/plain. This makes
it possible to both execute perl scripts, and to open them in text editors.
*/
QStringList QMimeType::parentMimeTypes() const
{
return QMimeDatabasePrivate::instance()->provider()->parents(d->name);
}
static void collectParentMimeTypes(const QString &mime, QStringList &allParents)
{
QStringList parents = QMimeDatabasePrivate::instance()->provider()->parents(mime);
foreach (const QString &parent, parents) {
// I would use QSet, but since order matters I better not
if (!allParents.contains(parent))
allParents.append(parent);
}
// We want a breadth-first search, so that the least-specific parent (octet-stream) is last
// This means iterating twice, unfortunately.
foreach (const QString &parent, parents) {
collectParentMimeTypes(parent, allParents);
}
}
/*!
Return all the parent mimetypes of this mimetype, direct and indirect.
This includes the parent(s) of its parent(s), etc.
For instance, for image/svg+xml the list would be:
application/xml, text/plain, application/octet-stream.
Note that application/octet-stream is the ultimate parent for all types
of files (but not directories).
*/
QStringList QMimeType::allAncestors() const
{
QStringList allParents;
collectParentMimeTypes(d->name, allParents);
return allParents;
}
/*!
Return the list of aliases of this mimetype.
For instance, for text/csv, the returned list would be:
text/x-csv, text/x-comma-separated-values.
Note that all QMimeType instances refer to proper mimetypes,
never to aliases directly.
The order of the aliases in the list is undefined.
*/
QStringList QMimeType::aliases() const
{
return QMimeDatabasePrivate::instance()->provider()->listAliases(d->name);
}
/*!
Returns the known suffixes for the MIME type.
No leading dot is included, so for instance this would return "jpg", "jpeg" for image/jpeg.
*/
QStringList QMimeType::suffixes() const
{
QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d);
QStringList result;
foreach (const QString &pattern, d->globPatterns) {
// Not a simple suffix if it looks like: README or *. or *.* or *.JP*G or *.JP?
if (pattern.startsWith(QLatin1String("*.")) &&
pattern.length() > 2 &&
pattern.indexOf(QLatin1Char('*'), 2) < 0 && pattern.indexOf(QLatin1Char('?'), 2) < 0) {
const QString suffix = pattern.mid(2);
result.append(suffix);
}
}
return result;
}
/*!
Returns the preferred suffix for the MIME type.
No leading dot is included, so for instance this would return "pdf" for application/pdf.
The return value can be empty, for mime types which do not have any suffixes associated.
*/
QString QMimeType::preferredSuffix() const
{
const QStringList suffixList = suffixes();
return suffixList.isEmpty() ? QString() : suffixList.at(0);
}
/*!
\fn QString QMimeType::filterString() const;
Returns a filter string usable for a file dialog.
*/
QString QMimeType::filterString() const
{
QMimeDatabasePrivate::instance()->provider()->loadMimeTypePrivate(*d);
QString filter;
if (!d->globPatterns.empty()) {
filter += comment() + QLatin1String(" (");
for (int i = 0; i < d->globPatterns.size(); ++i) {
if (i != 0)
filter += QLatin1Char(' ');
filter += d->globPatterns.at(i);
}
filter += QLatin1Char(')');
}
return filter;
}
/*!
\fn bool QMimeType::inherits(const QString &mimeTypeName) const;
Returns \c true if this mimetype is \a mimeTypeName,
or inherits \a mimeTypeName (see parentMimeTypes()),
or \a mimeTypeName is an alias for this mimetype.
*/
bool QMimeType::inherits(const QString &mimeTypeName) const
{
if (d->name == mimeTypeName)
return true;
return QMimeDatabasePrivate::instance()->inherits(d->name, mimeTypeName);
}
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, const QMimeType &mime)
{
QDebugStateSaver saver(debug);
if (!mime.isValid()) {
debug.nospace() << "QMimeType(invalid)";
} else {
debug.nospace() << "QMimeType(" << mime.name() << ")";
}
return debug;
}
#endif
QT_END_NAMESPACE
#endif // QT_NO_MIMETYPE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment