r19271 by craig - Move debug functions from util to util_debug.
scribus-commit
scribus-commit at lists.scribus.net
Mon Jun 23 15:28:58 UTC 2014
Author: craig
Date: Mon Jun 23 15:28:58 2014
New Revision: 19271
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19271
Log:
Move debug functions from util to util_debug.
Added:
trunk/Scribus/scribus/util_debug.cpp (with props)
trunk/Scribus/scribus/util_debug.h (with props)
Modified:
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/fonts/ftface.cpp
trunk/Scribus/scribus/fonts/scface_ttf.cpp
trunk/Scribus/scribus/scfonts.cpp
trunk/Scribus/scribus/scribuscore.cpp
trunk/Scribus/scribus/ui/helpbrowser.cpp
trunk/Scribus/scribus/ui/scmenu.cpp
trunk/Scribus/scribus/ui/storyeditor.cpp
trunk/Scribus/scribus/util.cpp
trunk/Scribus/scribus/util.h
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Mon Jun 23 15:28:58 2014
@@ -730,6 +730,7 @@
urllauncher.cpp
util.cpp
util_color.cpp
+ util_debug.cpp
util_file.cpp
util_formats.cpp
util_ghostscript.cpp
Modified: trunk/Scribus/scribus/fonts/ftface.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/fonts/ftface.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/ftface.cpp (original)
+++ trunk/Scribus/scribus/fonts/ftface.cpp Mon Jun 23 15:28:58 2014
@@ -14,7 +14,7 @@
#include <QFile>
#include "scfonts.h"
-#include "util.h"
+#include "util_debug.h"
#include "fonts/scfontmetrics.h"
// static:
Modified: trunk/Scribus/scribus/fonts/scface_ttf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/fonts/scface_ttf.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scface_ttf.cpp (original)
+++ trunk/Scribus/scribus/fonts/scface_ttf.cpp Mon Jun 23 15:28:58 2014
@@ -14,7 +14,7 @@
#include "fonts/scface_ttf.h"
#include "fonts/scfontmetrics.h"
-#include "util.h"
+#include "util_debug.h"
#include "scconfig.h"
KernFeature::KernFeature ( FT_Face face )
Modified: trunk/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/scfonts.cpp
==============================================================================
--- trunk/Scribus/scribus/scfonts.cpp (original)
+++ trunk/Scribus/scribus/scfonts.cpp Mon Jun 23 15:28:58 2014
@@ -60,7 +60,7 @@
#include "scpaths.h"
-#include "util.h"
+#include "util_debug.h"
Modified: trunk/Scribus/scribus/scribuscore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/scribuscore.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuscore.cpp (original)
+++ trunk/Scribus/scribus/scribuscore.cpp Mon Jun 23 15:28:58 2014
@@ -40,7 +40,7 @@
#include "scribusapp.h"
#include "ui/splash.h"
#include "undomanager.h"
-#include "util.h"
+#include "util_debug.h"
#include "util_ghostscript.h"
#include "util_icon.h"
Modified: trunk/Scribus/scribus/ui/helpbrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/ui/helpbrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/helpbrowser.cpp (original)
+++ trunk/Scribus/scribus/ui/helpbrowser.cpp Mon Jun 23 15:28:58 2014
@@ -57,7 +57,7 @@
#include "prefsmanager.h"
#include "scribuscore.h"
-#include "util.h"
+#include "util_debug.h"
#include "util_icon.h"
/*! \brief XML parsef for documantation history.
Modified: trunk/Scribus/scribus/ui/scmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/ui/scmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/scmenu.cpp Mon Jun 23 15:28:58 2014
@@ -26,7 +26,7 @@
#include <QList>
#include "scmenu.h"
#include "scraction.h"
-#include "util.h"
+#include "util_debug.h"
#include "util_icon.h"
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Mon Jun 23 15:28:58 2014
@@ -83,6 +83,7 @@
#include "ui/stylemanager.h"
#include "units.h"
#include "util.h"
+#include "util_debug.h"
#include "util_icon.h"
class StyledTextMimeData : public QMimeData
Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp (original)
+++ trunk/Scribus/scribus/util.cpp Mon Jun 23 15:28:58 2014
@@ -48,11 +48,6 @@
#endif
using namespace std;
-
-void sDebug(QString message)
-{
- qDebug("%s", message.toLatin1().constData());
-}
int System(const QString exename, const QStringList & args, const QString fileStdErr, const QString fileStdOut, bool* cancel)
{
@@ -762,12 +757,6 @@
} while (!tmp.isEmpty());
}
-void tDebug(QString message)
-{
- QDateTime debugTime;
- qDebug("%s", QString("%1\t%2").arg(debugTime.currentDateTime().toString("hh:mm:ss:zzz")).arg(message).toLatin1().constData());
-}
-
QString readLinefromDataStream(QDataStream &s)
{
@@ -966,62 +955,6 @@
break;
}
}
-
-/**
- * Print a backtrace
- * Please never commit code that uses it.
- * @param nFrames specify how much frames you want to be printed
- */
-void printBacktrace ( int nFrames )
-{
-#if !defined(_WIN32) && !defined(Q_OS_MAC) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_FREEBSD)
- void ** trace = new void*[nFrames + 1];
- char **messages = ( char ** ) NULL;
- int i, trace_size = 0;
-
- trace_size = backtrace ( trace, nFrames + 1 );
- messages = backtrace_symbols ( trace, trace_size );
- if ( messages )
- {
- for ( i=1; i < trace_size; ++i )
- {
- QString msg ( messages[i] );
- int sep1 ( msg.indexOf ( "(" ) );
- int sep2 ( msg.indexOf ( "+" ) );
- QString mName ( msg.mid ( sep1 + 1,sep2-sep1 -1) );
-
- QString name;
- if(mName.startsWith("_Z"))
- {
- char* outbuf = 0;
- size_t length = 0;
- int status = 0;
- outbuf = abi::__cxa_demangle(mName.trimmed().toLatin1().data(), outbuf, &length, &status);
- name = QString::fromLatin1( outbuf );
- if(0 == status)
- {
-// qDebug()<<"Demangle success["<< length <<"]"<<name;
- free(outbuf);
- }
-// else
-// {
-// qDebug()<<"Demangle failed ["<<status<<"]["<< mName.trimmed() <<"]";
-// continue;
-// }
- }
- else
- name = mName;
- if(name.isEmpty())
- name = mName;
- QString bts ( "[ScBT] %1. %2" );
- qDebug ("%s", bts.arg( i ).arg( name ).toUtf8().data() );
- }
- free ( messages );
- }
- delete[] trace;
-#endif
-}
-
bool convertOldTable(ScribusDoc *m_Doc, PageItem* gItem, QList<PageItem*> &gpL, QStack<QList<PageItem *> > *groupStackT, QList<PageItem *> *target)
{
Modified: trunk/Scribus/scribus/util.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19271&path=/trunk/Scribus/scribus/util.h
==============================================================================
--- trunk/Scribus/scribus/util.h (original)
+++ trunk/Scribus/scribus/util.h Mon Jun 23 15:28:58 2014
@@ -127,7 +127,6 @@
\author Petr Vanek
*/
QString SCRIBUS_API getFileNameByPage(ScribusDoc* currDoc, uint pageNo, QString extension, QString prefix=QString::null);
-void SCRIBUS_API sDebug(QString message);
//asterix is QString used in numeration when number is presented as few chars, like *, **, *** etc
//default is '*' but can be used any string
const QString SCRIBUS_API getStringFromSequence(NumFormat type, uint position, QString asterix="*");
@@ -137,12 +136,6 @@
const QString SCRIBUS_API numberToLetterSequence(uint i);
void SCRIBUS_API parsePagesString(QString pages, std::vector<int>* pageNs, int sourcePageCount);
-/*! \brief performance measurements.
-It prints given message with it current timestamp.
-Useful for duration holes finding.
-\author Petr Vanek */
-void tDebug(QString message);
-
QString SCRIBUS_API readLinefromDataStream(QDataStream &s);
void SCRIBUS_API setCurrentComboItem(QComboBox *box, QString text);
@@ -151,8 +144,6 @@
QString SCRIBUS_API getDashString(int dashtype, double linewidth);
void SCRIBUS_API getDashArray(int dashtype, double linewidth, QVector<double> &dashArray);
void SCRIBUS_API getDashArray(int dashtype, double linewidth, QVector<float> &dashArray);
-
-void SCRIBUS_API printBacktrace(int nFrames);
/*!
*\brief Convert pre-1.5.x tables to table as implemented in 1.5.x
More information about the scribus-commit
mailing list