diff --git a/kaffeine/CMakeLists.txt b/kaffeine/CMakeLists.txt index f19f2958..8bf3eb1b 100644 --- a/kaffeine/CMakeLists.txt +++ b/kaffeine/CMakeLists.txt @@ -7,6 +7,7 @@ find_package(X11 REQUIRED) find_package(VLC 1.2 REQUIRED) include(KDE4Defaults) +include(CheckIncludeFiles) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include @@ -20,10 +21,6 @@ add_definitions(${KDE4_DEFINITIONS}) if(STRICT_BUILD) add_definitions(-Werror -Weverything -Wno-packed -Wno-padded -Wno-sign-conversion -Wno-unreachable-code -Wno-weak-vtables -ferror-limit=5 - -isystem /usr/include/KDE - -isystem /usr/include/qt4/QtCore - -isystem /usr/include/qt4/QtGui - -isystem /usr/include/qt4/QtNetwork -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS) endif(STRICT_BUILD) diff --git a/kaffeine/icons/CMakeLists.txt b/kaffeine/icons/CMakeLists.txt index fbce9bc7..c8ccb1bd 100644 --- a/kaffeine/icons/CMakeLists.txt +++ b/kaffeine/icons/CMakeLists.txt @@ -2,4 +2,4 @@ # Copyright 2007 The Oxygen Team # Creative Common Attribution-ShareAlike 3.0 or LGPL2+ (+ clarification) -kde4_install_icons(${ICON_INSTALL_DIR}) +kde4_install_icons(${KDE4_ICON_INSTALL_DIR}) diff --git a/kaffeine/src/CMakeLists.txt b/kaffeine/src/CMakeLists.txt index e8a2b74f..877256c5 100644 --- a/kaffeine/src/CMakeLists.txt +++ b/kaffeine/src/CMakeLists.txt @@ -43,6 +43,6 @@ add_executable(kaffeine ${kaffeinedvb_SRCS} ${kaffeine_SRCS}) target_link_libraries(kaffeine ${QT_QTSQL_LIBRARY} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} ${KDE4_SOLID_LIBS} ${X11_Xscreensaver_LIB} ${VLC_LIBRARY}) install(TARGETS kaffeine ${INSTALL_TARGETS_DEFAULT_ARGS}) -install(FILES scanfile.dvb DESTINATION ${DATA_INSTALL_DIR}/kaffeine) -install(PROGRAMS kaffeine.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) +install(FILES scanfile.dvb DESTINATION ${KDE4_DATA_INSTALL_DIR}/kaffeine) +install(PROGRAMS kaffeine.desktop DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR}) install(FILES kaffeine.appdata.xml DESTINATION share/appdata/) diff --git a/kaffeine/src/dvb/dvbchannel.h b/kaffeine/src/dvb/dvbchannel.h index db75e3e3..b969b6af 100644 --- a/kaffeine/src/dvb/dvbchannel.h +++ b/kaffeine/src/dvb/dvbchannel.h @@ -55,8 +55,10 @@ public: bool isScrambled; }; -typedef ExplicitlySharedDataPointer DvbSharedChannel; +typedef ExplicitlySharedDataPointer DvbSharedChannel; +QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(DvbSharedChannel, Q_MOVABLE_TYPE); +QT_END_NAMESPACE class DvbChannelId { diff --git a/kaffeine/src/log.cpp b/kaffeine/src/log.cpp index e365d709..712db986 100644 --- a/kaffeine/src/log.cpp +++ b/kaffeine/src/log.cpp @@ -63,6 +63,12 @@ public: buffer.append(QString::number(value)); } + void append(quintptr value) + { + buffer.append(QLatin1Char(' ')); + buffer.append(QString::number(value)); + } + void append(const QString &string) { buffer.append(QLatin1String(" \"")); @@ -117,9 +123,14 @@ void Log::append(quint64 value) data->append(value); } +void Log::append(quintptr value) +{ + data->append(value); +} + void Log::append(const QString &string) { - data->append(string); + data->append(string); } void Log::end() @@ -127,4 +138,4 @@ void Log::end() data->end(); } -QBasicAtomicPointer Log::data = Q_BASIC_ATOMIC_INITIALIZER(0); +QAtomicPointer Log::data = QAtomicPointer(0); diff --git a/kaffeine/src/log.h b/kaffeine/src/log.h index d9ed8e09..eeb2bd83 100644 --- a/kaffeine/src/log.h +++ b/kaffeine/src/log.h @@ -64,6 +64,12 @@ public: return (*this); } + Log &operator<<(quintptr value) + { + append(value); + return (*this); + } + Log &operator<<(const QString &string) { append(string); @@ -76,10 +82,11 @@ private: static void begin(const char *message); static void append(qint64 value); static void append(quint64 value); + static void append(quintptr value); static void append(const QString &string); static void end(); - static QBasicAtomicPointer data; + static QAtomicPointer data; }; #endif /* LOG_H */ diff --git a/kaffeine/src/sqlinterface.h b/kaffeine/src/sqlinterface.h index 32ebd601..f1ddb5e0 100644 --- a/kaffeine/src/sqlinterface.h +++ b/kaffeine/src/sqlinterface.h @@ -61,7 +61,9 @@ public: quint32 sqlKey; }; +QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(SqlKey, Q_MOVABLE_TYPE); +QT_END_NAMESPACE class SqlInterface { diff --git a/karchivemanager/karchivemanager.hpp b/karchivemanager/karchivemanager.hpp index 166398fc..f9e9ac79 100644 --- a/karchivemanager/karchivemanager.hpp +++ b/karchivemanager/karchivemanager.hpp @@ -91,7 +91,7 @@ const QDBusArgument &operator>>(const QDBusArgument &, KArchiveInfo &i); class KArchiveManagerPrivate; /*! - Archive manager with support for many formats, provides plain GZip and BZip2 support aswell + Archive manager with support for many formats Example: \code diff --git a/kcachegrind/CMakeLists.txt b/kcachegrind/CMakeLists.txt index 79fe0836..e9130a14 100644 --- a/kcachegrind/CMakeLists.txt +++ b/kcachegrind/CMakeLists.txt @@ -19,16 +19,6 @@ IF(NOT WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kcachegrind.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/kcachegrind.lsm ) ENDIF(NOT WIN32) -macro_additional_clean_files( - ${CMAKE_CURRENT_BINARY_DIR}/version.h - ) -IF(NOT WIN32) -macro_additional_clean_files( - ${CMAKE_CURRENT_BINARY_DIR}/kcachegrind.lsm - ${CMAKE_CURRENT_BINARY_DIR}/kcachegrind.spec - ) -ENDIF(NOT WIN32) - add_subdirectory( libcore ) add_subdirectory( cgview ) add_subdirectory( libviews ) diff --git a/kcachegrind/converters/CMakeLists.txt b/kcachegrind/converters/CMakeLists.txt index 2589d7cb..ac7b2fee 100644 --- a/kcachegrind/converters/CMakeLists.txt +++ b/kcachegrind/converters/CMakeLists.txt @@ -2,10 +2,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/hotshot2calltree.cmake ${CMAKE_CURRENT_BINARY_DIR}/hotshot2calltree ) -macro_additional_clean_files( - ${CMAKE_CURRENT_BINARY_DIR}/hotshot2calltree - ) install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/hotshot2calltree op2calltree pprof2calltree dprof2calltree memprof2calltree - DESTINATION ${BIN_INSTALL_DIR} ) + DESTINATION ${KDE4_BIN_INSTALL_DIR} ) diff --git a/kcachegrind/kcachegrind/CMakeLists.txt b/kcachegrind/kcachegrind/CMakeLists.txt index 581b726f..0af22023 100644 --- a/kcachegrind/kcachegrind/CMakeLists.txt +++ b/kcachegrind/kcachegrind/CMakeLists.txt @@ -19,10 +19,10 @@ install(TARGETS kcachegrind ${INSTALL_TARGETS_DEFAULT_ARGS} ) ########### install files ############### -install( PROGRAMS kcachegrind.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES tips DESTINATION ${DATA_INSTALL_DIR}/kcachegrind ) -install( FILES kcachegrindui.rc DESTINATION ${DATA_INSTALL_DIR}/kcachegrind ) +install( PROGRAMS kcachegrind.desktop DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR} ) +install( FILES tips DESTINATION ${KDE4_DATA_INSTALL_DIR}/kcachegrind ) +install( FILES kcachegrindui.rc DESTINATION ${KDE4_DATA_INSTALL_DIR}/kcachegrind ) -kde4_install_icons( ${ICON_INSTALL_DIR} ) +kde4_install_icons( ${KDE4_ICON_INSTALL_DIR} ) diff --git a/kcachegrind/libviews/callgraphview.cpp b/kcachegrind/libviews/callgraphview.cpp index de063bea..9bed09ad 100644 --- a/kcachegrind/libviews/callgraphview.cpp +++ b/kcachegrind/libviews/callgraphview.cpp @@ -2716,7 +2716,7 @@ QMenu* CallGraphView::addCallerDepthMenu(QMenu* menu) a = addCallerDepthAction(m, tr("Unlimited"), -1); a->setEnabled(_funcLimit>0.005); m->addSeparator(); - addCallerDepthAction(m, tr("Depth 0", "None"), 0); + addCallerDepthAction(m, tr("None"), 0); addCallerDepthAction(m, tr("max. 2"), 2); addCallerDepthAction(m, tr("max. 5"), 5); addCallerDepthAction(m, tr("max. 10"), 10); @@ -2755,7 +2755,7 @@ QMenu* CallGraphView::addCalleeDepthMenu(QMenu* menu) a = addCalleeDepthAction(m, tr("Unlimited"), -1); a->setEnabled(_funcLimit>0.005); m->addSeparator(); - addCalleeDepthAction(m, tr("Depth 0", "None"), 0); + addCalleeDepthAction(m, tr("None"), 0); addCalleeDepthAction(m, tr("max. 2"), 2); addCalleeDepthAction(m, tr("max. 5"), 5); addCalleeDepthAction(m, tr("max. 10"), 10); diff --git a/kcachegrind/libviews/callmapview.cpp b/kcachegrind/libviews/callmapview.cpp index c368e073..51bd38bc 100644 --- a/kcachegrind/libviews/callmapview.cpp +++ b/kcachegrind/libviews/callmapview.cpp @@ -59,7 +59,7 @@ CallMapView::CallMapView(bool showCallers, TraceItemView* parentView, setObjectName(name); _showCallers = showCallers; - setFieldType(0, tr("A thing's name", "Name" )); + setFieldType(0, tr( "Name" )); setFieldType(1, tr( "Cost" )); setFieldType(2, tr( "Location" )); setFieldPosition(2, TreeMapItem::TopLeft); diff --git a/kcachegrind/libviews/costlistitem.cpp b/kcachegrind/libviews/costlistitem.cpp index a44204bf..8034b583 100644 --- a/kcachegrind/libviews/costlistitem.cpp +++ b/kcachegrind/libviews/costlistitem.cpp @@ -58,7 +58,7 @@ CostListItem::CostListItem(QTreeWidget* parent, int skipped, setTextAlignment(0, Qt::AlignRight); - setText(1, QObject::tr("(%n item(s) skipped)", "", _skipped)); + setText(1, QObject::tr("(%1 item(s) skipped)").arg(_skipped)); } void CostListItem::setEventType(EventType* et) diff --git a/kcachegrind/libviews/coverageitem.cpp b/kcachegrind/libviews/coverageitem.cpp index 7f3b3097..f21f3c9c 100644 --- a/kcachegrind/libviews/coverageitem.cpp +++ b/kcachegrind/libviews/coverageitem.cpp @@ -63,7 +63,7 @@ CallerCoverageItem::CallerCoverageItem(QTreeWidget* parent, int skipped, Coverag _base = base; _groupType = ProfileContext::InvalidType; - setText(3, QObject::tr("(%n function(s) skipped)", "", _skipped)); + setText(3, QObject::tr("(%1 function(s) skipped)").arg(_skipped)); setTextAlignment(0, Qt::AlignRight); setTextAlignment(1, Qt::AlignRight); setTextAlignment(2, Qt::AlignRight); @@ -200,7 +200,7 @@ CalleeCoverageItem::CalleeCoverageItem(QTreeWidget* parent, int skipped, Coverag _base = base; _groupType = ProfileContext::InvalidType; - setText(4, QObject::tr("(%n function(s) skipped)", "", _skipped)); + setText(4, QObject::tr("(%1 function(s) skipped)").arg(_skipped)); setTextAlignment(0, Qt::AlignRight); setTextAlignment(1, Qt::AlignRight); diff --git a/kcachegrind/libviews/instritem.cpp b/kcachegrind/libviews/instritem.cpp index 4387df14..80743414 100644 --- a/kcachegrind/libviews/instritem.cpp +++ b/kcachegrind/libviews/instritem.cpp @@ -116,7 +116,7 @@ InstrItem::InstrItem(InstrView* iv, QTreeWidgetItem* parent, Addr addr, callStr += QObject::tr("Active call to '%1'") .arg(_instrCall->call()->calledName()); else - callStr += QObject::tr("%n call(s) to '%2'", "", (uint64)cc) + callStr += QObject::tr("%1 call(s) to '%2'").arg((uint64)cc) .arg(_instrCall->call()->calledName()); TraceFunction* calledF = _instrCall->call()->called(); diff --git a/kcachegrind/libviews/instrview.cpp b/kcachegrind/libviews/instrview.cpp index 8bb94faf..32528a46 100644 --- a/kcachegrind/libviews/instrview.cpp +++ b/kcachegrind/libviews/instrview.cpp @@ -1071,7 +1071,7 @@ bool InstrView::fillInstrRange(TraceFunction* function, // trace cost not matching code new InstrItem(this, this, 1, - tr("There are %n cost line(s) without machine code.", "", noAssLines)); + tr("There are %1 cost line(s) without machine code.").arg(noAssLines)); new InstrItem(this, this, 2, tr("This happens because the code of")); new InstrItem(this, this, 3, QString(" %1").arg(objfile)); diff --git a/kcachegrind/libviews/partselection.cpp b/kcachegrind/libviews/partselection.cpp index 02268ba7..346851fd 100644 --- a/kcachegrind/libviews/partselection.cpp +++ b/kcachegrind/libviews/partselection.cpp @@ -68,8 +68,8 @@ PartSelection::PartSelection( TopLevelBase* top, _partAreaWidget->setSelectionMode(TreeMapWidget::Extended); _partAreaWidget->setSplitMode(TreeMapItem::HAlternate); _partAreaWidget->setVisibleWidth(2, true); - _partAreaWidget->setFieldType(0, tr("Name", "A thing's name")); - _partAreaWidget->setFieldType(1, tr("Cost" )); + _partAreaWidget->setFieldType(0, tr("Name")); + _partAreaWidget->setFieldType(1, tr("Cost")); vboxLayout->addWidget(_partAreaWidget); _rangeLabel = new QLabel(this); diff --git a/kcachegrind/libviews/sourceitem.cpp b/kcachegrind/libviews/sourceitem.cpp index 2688fb7e..6dfa5239 100644 --- a/kcachegrind/libviews/sourceitem.cpp +++ b/kcachegrind/libviews/sourceitem.cpp @@ -95,7 +95,7 @@ SourceItem::SourceItem(SourceView* sv, QTreeWidgetItem* parent, callStr += QObject::tr("Active call to '%1'") .arg(_lineCall->call()->calledName()); else - callStr += QObject::tr("%n call(s) to '%2'", "", (uint64)cc) + callStr += QObject::tr("%1 call(s) to '%2'").arg((uint64)cc) .arg(_lineCall->call()->calledName()); TraceFunction* calledF = _lineCall->call()->called(); diff --git a/kcachegrind/libviews/tabview.cpp b/kcachegrind/libviews/tabview.cpp index 9cdc1def..042c0bcb 100644 --- a/kcachegrind/libviews/tabview.cpp +++ b/kcachegrind/libviews/tabview.cpp @@ -112,19 +112,19 @@ void TabBar::context(QWidget* page, const QPoint & pos) TraceItemView::Position p = _tabView->tabPosition(page); if (p != TraceItemView::Top) { pageToTopAction = popup.addAction(tr("Move to Top")); - areaToTopAction = popup2.addAction(tr("Top", "Move to Top")); + areaToTopAction = popup2.addAction(tr("Move to Top")); } if (p != TraceItemView::Right) { pageToRightAction = popup.addAction(tr("Move to Right")); - areaToRightAction = popup2.addAction(tr("Right", "Move to Right")); + areaToRightAction = popup2.addAction(tr("Move to Right")); } if (p != TraceItemView::Bottom) { pageToBottomAction = popup.addAction(tr("Move to Bottom")); - areaToBottomAction = popup2.addAction(tr("Bottom", "Move to Bottom")); + areaToBottomAction = popup2.addAction(tr("Move to Bottom")); } if (p != TraceItemView::Left) { pageToLeftAction = popup.addAction(tr("Move to Bottom Left")); - areaToLeftAction = popup2.addAction(tr("Bottom Left", "Move to Bottom Left")); + areaToLeftAction = popup2.addAction(tr( "Move to Bottom Left")); } popup2.setTitle(tr("Move Area To")); popup.addMenu(&popup2); @@ -139,10 +139,10 @@ void TabBar::context(QWidget* page, const QPoint & pos) hideAreaAction->setEnabled(false); } - showOnTopAction = popup3.addAction(tr("Top", "Show on Top")); - showOnRightAction = popup3.addAction(tr("Right", "Show on Right")); - showOnBottomAction = popup3.addAction(tr("Bottom", "Show on Bottom")); - showOnLeftAction = popup3.addAction(tr("Bottom Left", "Show on Bottom Left")); + showOnTopAction = popup3.addAction(tr("Show on Top")); + showOnRightAction = popup3.addAction(tr("Show on Right")); + showOnBottomAction = popup3.addAction(tr("Show on Bottom")); + showOnLeftAction = popup3.addAction(tr("Show on Bottom Left")); popup3.setTitle(tr("Show Hidden On")); popup.addMenu(&popup3);