kcachegrind: adjust to Katana and Katie changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-06-25 17:54:47 +03:00
parent f859dff78a
commit 2e71a21b77
20 changed files with 55 additions and 49 deletions

View file

@ -7,6 +7,7 @@ find_package(X11 REQUIRED)
find_package(VLC 1.2 REQUIRED) find_package(VLC 1.2 REQUIRED)
include(KDE4Defaults) include(KDE4Defaults)
include(CheckIncludeFiles)
include_directories( include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include
@ -20,10 +21,6 @@ add_definitions(${KDE4_DEFINITIONS})
if(STRICT_BUILD) if(STRICT_BUILD)
add_definitions(-Werror -Weverything -Wno-packed -Wno-padded -Wno-sign-conversion -Wno-unreachable-code add_definitions(-Werror -Weverything -Wno-packed -Wno-padded -Wno-sign-conversion -Wno-unreachable-code
-Wno-weak-vtables -ferror-limit=5 -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_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII
-DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS) -DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS)
endif(STRICT_BUILD) endif(STRICT_BUILD)

View file

@ -2,4 +2,4 @@
# Copyright 2007 The Oxygen Team # Copyright 2007 The Oxygen Team
# Creative Common Attribution-ShareAlike 3.0 or LGPL2+ (+ clarification) # Creative Common Attribution-ShareAlike 3.0 or LGPL2+ (+ clarification)
kde4_install_icons(${ICON_INSTALL_DIR}) kde4_install_icons(${KDE4_ICON_INSTALL_DIR})

View file

@ -43,6 +43,6 @@ add_executable(kaffeine ${kaffeinedvb_SRCS} ${kaffeine_SRCS})
target_link_libraries(kaffeine ${QT_QTSQL_LIBRARY} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS} target_link_libraries(kaffeine ${QT_QTSQL_LIBRARY} ${KDE4_KFILE_LIBS} ${KDE4_KIO_LIBS}
${KDE4_SOLID_LIBS} ${X11_Xscreensaver_LIB} ${VLC_LIBRARY}) ${KDE4_SOLID_LIBS} ${X11_Xscreensaver_LIB} ${VLC_LIBRARY})
install(TARGETS kaffeine ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS kaffeine ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES scanfile.dvb DESTINATION ${DATA_INSTALL_DIR}/kaffeine) install(FILES scanfile.dvb DESTINATION ${KDE4_DATA_INSTALL_DIR}/kaffeine)
install(PROGRAMS kaffeine.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) install(PROGRAMS kaffeine.desktop DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR})
install(FILES kaffeine.appdata.xml DESTINATION share/appdata/) install(FILES kaffeine.appdata.xml DESTINATION share/appdata/)

View file

@ -55,8 +55,10 @@ public:
bool isScrambled; bool isScrambled;
}; };
typedef ExplicitlySharedDataPointer<const DvbChannel> DvbSharedChannel; typedef ExplicitlySharedDataPointer<DvbChannel> DvbSharedChannel;
QT_BEGIN_NAMESPACE
Q_DECLARE_TYPEINFO(DvbSharedChannel, Q_MOVABLE_TYPE); Q_DECLARE_TYPEINFO(DvbSharedChannel, Q_MOVABLE_TYPE);
QT_END_NAMESPACE
class DvbChannelId class DvbChannelId
{ {

View file

@ -63,6 +63,12 @@ public:
buffer.append(QString::number(value)); buffer.append(QString::number(value));
} }
void append(quintptr value)
{
buffer.append(QLatin1Char(' '));
buffer.append(QString::number(value));
}
void append(const QString &string) void append(const QString &string)
{ {
buffer.append(QLatin1String(" \"")); buffer.append(QLatin1String(" \""));
@ -117,6 +123,11 @@ void Log::append(quint64 value)
data->append(value); data->append(value);
} }
void Log::append(quintptr value)
{
data->append(value);
}
void Log::append(const QString &string) void Log::append(const QString &string)
{ {
data->append(string); data->append(string);
@ -127,4 +138,4 @@ void Log::end()
data->end(); data->end();
} }
QBasicAtomicPointer<LogPrivate> Log::data = Q_BASIC_ATOMIC_INITIALIZER(0); QAtomicPointer<LogPrivate> Log::data = QAtomicPointer<LogPrivate>(0);

View file

@ -64,6 +64,12 @@ public:
return (*this); return (*this);
} }
Log &operator<<(quintptr value)
{
append(value);
return (*this);
}
Log &operator<<(const QString &string) Log &operator<<(const QString &string)
{ {
append(string); append(string);
@ -76,10 +82,11 @@ private:
static void begin(const char *message); static void begin(const char *message);
static void append(qint64 value); static void append(qint64 value);
static void append(quint64 value); static void append(quint64 value);
static void append(quintptr value);
static void append(const QString &string); static void append(const QString &string);
static void end(); static void end();
static QBasicAtomicPointer<LogPrivate> data; static QAtomicPointer<LogPrivate> data;
}; };
#endif /* LOG_H */ #endif /* LOG_H */

View file

@ -61,7 +61,9 @@ public:
quint32 sqlKey; quint32 sqlKey;
}; };
QT_BEGIN_NAMESPACE
Q_DECLARE_TYPEINFO(SqlKey, Q_MOVABLE_TYPE); Q_DECLARE_TYPEINFO(SqlKey, Q_MOVABLE_TYPE);
QT_END_NAMESPACE
class SqlInterface class SqlInterface
{ {

View file

@ -91,7 +91,7 @@ const QDBusArgument &operator>>(const QDBusArgument &, KArchiveInfo &i);
class KArchiveManagerPrivate; class KArchiveManagerPrivate;
/*! /*!
Archive manager with support for many formats, provides plain GZip and BZip2 support aswell Archive manager with support for many formats
Example: Example:
\code \code

View file

@ -19,16 +19,6 @@ IF(NOT WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kcachegrind.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/kcachegrind.lsm ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kcachegrind.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/kcachegrind.lsm )
ENDIF(NOT WIN32) 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( libcore )
add_subdirectory( cgview ) add_subdirectory( cgview )
add_subdirectory( libviews ) add_subdirectory( libviews )

View file

@ -2,10 +2,7 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/hotshot2calltree.cmake ${CMAKE_CURRENT_SOURCE_DIR}/hotshot2calltree.cmake
${CMAKE_CURRENT_BINARY_DIR}/hotshot2calltree ${CMAKE_CURRENT_BINARY_DIR}/hotshot2calltree
) )
macro_additional_clean_files(
${CMAKE_CURRENT_BINARY_DIR}/hotshot2calltree
)
install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/hotshot2calltree install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/hotshot2calltree
op2calltree pprof2calltree dprof2calltree memprof2calltree op2calltree pprof2calltree dprof2calltree memprof2calltree
DESTINATION ${BIN_INSTALL_DIR} ) DESTINATION ${KDE4_BIN_INSTALL_DIR} )

View file

@ -19,10 +19,10 @@ install(TARGETS kcachegrind ${INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ############### ########### install files ###############
install( PROGRAMS kcachegrind.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) install( PROGRAMS kcachegrind.desktop DESTINATION ${KDE4_XDG_APPS_INSTALL_DIR} )
install( FILES tips DESTINATION ${DATA_INSTALL_DIR}/kcachegrind ) install( FILES tips DESTINATION ${KDE4_DATA_INSTALL_DIR}/kcachegrind )
install( FILES kcachegrindui.rc DESTINATION ${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} )

View file

@ -2716,7 +2716,7 @@ QMenu* CallGraphView::addCallerDepthMenu(QMenu* menu)
a = addCallerDepthAction(m, tr("Unlimited"), -1); a = addCallerDepthAction(m, tr("Unlimited"), -1);
a->setEnabled(_funcLimit>0.005); a->setEnabled(_funcLimit>0.005);
m->addSeparator(); m->addSeparator();
addCallerDepthAction(m, tr("Depth 0", "None"), 0); addCallerDepthAction(m, tr("None"), 0);
addCallerDepthAction(m, tr("max. 2"), 2); addCallerDepthAction(m, tr("max. 2"), 2);
addCallerDepthAction(m, tr("max. 5"), 5); addCallerDepthAction(m, tr("max. 5"), 5);
addCallerDepthAction(m, tr("max. 10"), 10); addCallerDepthAction(m, tr("max. 10"), 10);
@ -2755,7 +2755,7 @@ QMenu* CallGraphView::addCalleeDepthMenu(QMenu* menu)
a = addCalleeDepthAction(m, tr("Unlimited"), -1); a = addCalleeDepthAction(m, tr("Unlimited"), -1);
a->setEnabled(_funcLimit>0.005); a->setEnabled(_funcLimit>0.005);
m->addSeparator(); m->addSeparator();
addCalleeDepthAction(m, tr("Depth 0", "None"), 0); addCalleeDepthAction(m, tr("None"), 0);
addCalleeDepthAction(m, tr("max. 2"), 2); addCalleeDepthAction(m, tr("max. 2"), 2);
addCalleeDepthAction(m, tr("max. 5"), 5); addCalleeDepthAction(m, tr("max. 5"), 5);
addCalleeDepthAction(m, tr("max. 10"), 10); addCalleeDepthAction(m, tr("max. 10"), 10);

View file

@ -59,7 +59,7 @@ CallMapView::CallMapView(bool showCallers, TraceItemView* parentView,
setObjectName(name); setObjectName(name);
_showCallers = showCallers; _showCallers = showCallers;
setFieldType(0, tr("A thing's name", "Name" )); setFieldType(0, tr( "Name" ));
setFieldType(1, tr( "Cost" )); setFieldType(1, tr( "Cost" ));
setFieldType(2, tr( "Location" )); setFieldType(2, tr( "Location" ));
setFieldPosition(2, TreeMapItem::TopLeft); setFieldPosition(2, TreeMapItem::TopLeft);

View file

@ -58,7 +58,7 @@ CostListItem::CostListItem(QTreeWidget* parent, int skipped,
setTextAlignment(0, Qt::AlignRight); 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) void CostListItem::setEventType(EventType* et)

View file

@ -63,7 +63,7 @@ CallerCoverageItem::CallerCoverageItem(QTreeWidget* parent, int skipped, Coverag
_base = base; _base = base;
_groupType = ProfileContext::InvalidType; _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(0, Qt::AlignRight);
setTextAlignment(1, Qt::AlignRight); setTextAlignment(1, Qt::AlignRight);
setTextAlignment(2, Qt::AlignRight); setTextAlignment(2, Qt::AlignRight);
@ -200,7 +200,7 @@ CalleeCoverageItem::CalleeCoverageItem(QTreeWidget* parent, int skipped, Coverag
_base = base; _base = base;
_groupType = ProfileContext::InvalidType; _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(0, Qt::AlignRight);
setTextAlignment(1, Qt::AlignRight); setTextAlignment(1, Qt::AlignRight);

View file

@ -116,7 +116,7 @@ InstrItem::InstrItem(InstrView* iv, QTreeWidgetItem* parent, Addr addr,
callStr += QObject::tr("Active call to '%1'") callStr += QObject::tr("Active call to '%1'")
.arg(_instrCall->call()->calledName()); .arg(_instrCall->call()->calledName());
else 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()); .arg(_instrCall->call()->calledName());
TraceFunction* calledF = _instrCall->call()->called(); TraceFunction* calledF = _instrCall->call()->called();

View file

@ -1071,7 +1071,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
// trace cost not matching code // trace cost not matching code
new InstrItem(this, this, 1, 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, new InstrItem(this, this, 2,
tr("This happens because the code of")); tr("This happens because the code of"));
new InstrItem(this, this, 3, QString(" %1").arg(objfile)); new InstrItem(this, this, 3, QString(" %1").arg(objfile));

View file

@ -68,8 +68,8 @@ PartSelection::PartSelection( TopLevelBase* top,
_partAreaWidget->setSelectionMode(TreeMapWidget::Extended); _partAreaWidget->setSelectionMode(TreeMapWidget::Extended);
_partAreaWidget->setSplitMode(TreeMapItem::HAlternate); _partAreaWidget->setSplitMode(TreeMapItem::HAlternate);
_partAreaWidget->setVisibleWidth(2, true); _partAreaWidget->setVisibleWidth(2, true);
_partAreaWidget->setFieldType(0, tr("Name", "A thing's name")); _partAreaWidget->setFieldType(0, tr("Name"));
_partAreaWidget->setFieldType(1, tr("Cost" )); _partAreaWidget->setFieldType(1, tr("Cost"));
vboxLayout->addWidget(_partAreaWidget); vboxLayout->addWidget(_partAreaWidget);
_rangeLabel = new QLabel(this); _rangeLabel = new QLabel(this);

View file

@ -95,7 +95,7 @@ SourceItem::SourceItem(SourceView* sv, QTreeWidgetItem* parent,
callStr += QObject::tr("Active call to '%1'") callStr += QObject::tr("Active call to '%1'")
.arg(_lineCall->call()->calledName()); .arg(_lineCall->call()->calledName());
else 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()); .arg(_lineCall->call()->calledName());
TraceFunction* calledF = _lineCall->call()->called(); TraceFunction* calledF = _lineCall->call()->called();

View file

@ -112,19 +112,19 @@ void TabBar::context(QWidget* page, const QPoint & pos)
TraceItemView::Position p = _tabView->tabPosition(page); TraceItemView::Position p = _tabView->tabPosition(page);
if (p != TraceItemView::Top) { if (p != TraceItemView::Top) {
pageToTopAction = popup.addAction(tr("Move to 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) { if (p != TraceItemView::Right) {
pageToRightAction = popup.addAction(tr("Move to 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) { if (p != TraceItemView::Bottom) {
pageToBottomAction = popup.addAction(tr("Move to 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) { if (p != TraceItemView::Left) {
pageToLeftAction = popup.addAction(tr("Move to Bottom 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")); popup2.setTitle(tr("Move Area To"));
popup.addMenu(&popup2); popup.addMenu(&popup2);
@ -139,10 +139,10 @@ void TabBar::context(QWidget* page, const QPoint & pos)
hideAreaAction->setEnabled(false); hideAreaAction->setEnabled(false);
} }
showOnTopAction = popup3.addAction(tr("Top", "Show on Top")); showOnTopAction = popup3.addAction(tr("Show on Top"));
showOnRightAction = popup3.addAction(tr("Right", "Show on Right")); showOnRightAction = popup3.addAction(tr("Show on Right"));
showOnBottomAction = popup3.addAction(tr("Bottom", "Show on Bottom")); showOnBottomAction = popup3.addAction(tr("Show on Bottom"));
showOnLeftAction = popup3.addAction(tr("Bottom Left", "Show on Bottom Left")); showOnLeftAction = popup3.addAction(tr("Show on Bottom Left"));
popup3.setTitle(tr("Show Hidden On")); popup3.setTitle(tr("Show Hidden On"));
popup.addMenu(&popup3); popup.addMenu(&popup3);