mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-23 10:22:50 +00:00
kcachegrind: adjust to Katana and Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f859dff78a
commit
2e71a21b77
20 changed files with 55 additions and 49 deletions
|
@ -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)
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -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/)
|
||||
|
|
|
@ -55,8 +55,10 @@ public:
|
|||
bool isScrambled;
|
||||
};
|
||||
|
||||
typedef ExplicitlySharedDataPointer<const DvbChannel> DvbSharedChannel;
|
||||
typedef ExplicitlySharedDataPointer<DvbChannel> DvbSharedChannel;
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_DECLARE_TYPEINFO(DvbSharedChannel, Q_MOVABLE_TYPE);
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class DvbChannelId
|
||||
{
|
||||
|
|
|
@ -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,6 +123,11 @@ 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);
|
||||
|
@ -127,4 +138,4 @@ void Log::end()
|
|||
data->end();
|
||||
}
|
||||
|
||||
QBasicAtomicPointer<LogPrivate> Log::data = Q_BASIC_ATOMIC_INITIALIZER(0);
|
||||
QAtomicPointer<LogPrivate> Log::data = QAtomicPointer<LogPrivate>(0);
|
||||
|
|
|
@ -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<LogPrivate> data;
|
||||
static QAtomicPointer<LogPrivate> data;
|
||||
};
|
||||
|
||||
#endif /* LOG_H */
|
||||
|
|
|
@ -61,7 +61,9 @@ public:
|
|||
quint32 sqlKey;
|
||||
};
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_DECLARE_TYPEINFO(SqlKey, Q_MOVABLE_TYPE);
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class SqlInterface
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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} )
|
||||
|
|
|
@ -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} )
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -68,7 +68,7 @@ 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(0, tr("Name"));
|
||||
_partAreaWidget->setFieldType(1, tr("Cost"));
|
||||
vboxLayout->addWidget(_partAreaWidget);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue