Skip to content

Instantly share code, notes, and snippets.

@dtjm
Created July 26, 2010 22:58
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dtjm/491405 to your computer and use it in GitHub Desktop.
Save dtjm/491405 to your computer and use it in GitHub Desktop.
A script to install qcachegrind (the QT version of KCacheGrind) from the source tree at the KDE project. It will also install QT from homebrew with the required dependencies (which takes about 2 hours).
Index: qcachegrind/qcgtoplevel.cpp
===================================================================
--- qcachegrind/qcgtoplevel.cpp (revision 1155013)
+++ qcachegrind/qcgtoplevel.cpp (working copy)
@@ -792,7 +792,7 @@
file = QFileDialog::getOpenFileName(this,
tr("Open Callgrind Data"),
_lastFile,
- tr("Callgrind Files (callgrind.*)"));
+ tr("Cachegrind Files (*cachegrind.*);;Callgrind Files (*callgrind.*);;All Files (*)"));
loadTrace(file);
}
@@ -839,7 +839,7 @@
file = QFileDialog::getOpenFileName(this,
tr("Add Callgrind Data"),
_lastFile,
- tr("Callgrind Files (callgrind.*)"));
+ tr("Cachegrind Files (*cachegrind.*);;Callgrind Files (*callgrind.*);;All Files (*)"));
addTrace(file);
}
#!/bin/bash
# This is a script that will install qt via homebrew
# and will compile QCacheGrind (the QT version of KCacheGrind)
# and place it into your /Applications folder
#
# Currently the "Callee Map" function will beachball the app
# so don't use it!
# TODO: If QT is already installed, check for dbus and qt3support
echo "======================================="
echo "Installing QT with DBUS and Qt3Support"
echo "This will take about 2 hours"
echo "======================================="
brew install qt --with-qtdbus --with-qt3support
echo
echo
echo "======================================="
echo "QT installation complete."
echo "Compiling qcachegrind..."
echo "======================================="
echo
cd $TMPDIR
svn export -r 1155128 svn://anonsvn.kde.org/home/kde/trunk/KDE/kdesdk/kcachegrind
cd kcachegrind
curl http://gist.github.com/raw/491405/file-dialog-filters.diff | patch -p0
qmake
make
echo
echo
echo "============================================"
echo "Password needed to install into /Applications:"
echo "============================================"
sudo cp -r qcachegrind/qcachegrind.app /Applications/QCacheGrind.app
echo
echo
echo "=========================================="
echo "QCacheGrind.app installed in /Applications"
echo "=========================================="
@oskarols
Copy link

oskarols commented Jun 9, 2011

To anyone that stumbles across this, it doesn't work any more - you end up with a completely broken QCachegrind that can't open files.

@dtjm
Copy link
Author

dtjm commented Jun 21, 2011

@oskarois thanks for the note. This is pretty old.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment