Hi guys, What I don't really like about KDE's reviewboard is that git adds a header to diffs when using git format-patch. And when the diff gets applied by a reviewer to Calligra, then because this header is stripped git doesn't always recognize the patch having been applied with the commit in my own git clone. And then I have to fix a huge conflict afterward.
Can KDE's reviewboard be fixed not to strip that header and Calligra maintainers use git am instead of patch to apply patches? Kind regards, Philip On Fri, 2012-12-14 at 13:39 +0000, Philip Hoof wrote: > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/107717/ > > Review request for Calligra. > By Philip Hoof. > Description > From 6df02b31d66934ac57a4bce123bab8fcc0dbdf82 Mon Sep 17 00:00:00 2001 > From: Philip Van Hoof <phi...@codeminded.be> > Date: Fri, 14 Dec 2012 14:34:49 +0100 > Subject: [PATCH] Move ElapsedTime class to a private header that wont be > installed > > This also fixes a old-style-cast problem in the class's destructor > Diffs > * sheets/ElapsedTime_p.h (PRE-CREATION) > * sheets/Global.h (1759095) > * sheets/RecalcManager.cpp (c5674f2) > * sheets/part/CanvasBase.cpp (f973f40) > * sheets/part/Headers.cpp (f29408f) > * sheets/part/View.cpp (6a12d45) > * sheets/DocBase.cpp (d67c66d) > * sheets/DependencyManager.cpp (60e82e8) > > View Diff > > > _______________________________________________ > calligra-devel mailing list > calligra-devel@kde.org > https://mail.kde.org/mailman/listinfo/calligra-devel -- Philip Van Hoof Software developer Codeminded BVBA - http://codeminded.be
>From 6df02b31d66934ac57a4bce123bab8fcc0dbdf82 Mon Sep 17 00:00:00 2001 From: Philip Van Hoof <phi...@codeminded.be> Date: Fri, 14 Dec 2012 14:34:49 +0100 Subject: [PATCH] Move ElapsedTime class to a private header that wont be installed This also fixes a old-style-cast problem in the class's destructor --- sheets/DependencyManager.cpp | 1 + sheets/DocBase.cpp | 2 + sheets/ElapsedTime_p.h | 90 ++++++++++++++++++++++++++++++++++++++++++ sheets/Global.h | 45 --------------------- sheets/RecalcManager.cpp | 1 + sheets/part/CanvasBase.cpp | 3 +- sheets/part/Headers.cpp | 3 +- sheets/part/View.cpp | 3 +- 8 files changed, 100 insertions(+), 48 deletions(-) create mode 100644 sheets/ElapsedTime_p.h diff --git a/sheets/DependencyManager.cpp b/sheets/DependencyManager.cpp index 60e82e8..674a156 100644 --- a/sheets/DependencyManager.cpp +++ b/sheets/DependencyManager.cpp @@ -34,6 +34,7 @@ #include "Sheet.h" #include "Value.h" #include "DocBase.h" +#include "ElapsedTime_p.h" #include <QHash> #include <QList> diff --git a/sheets/DocBase.cpp b/sheets/DocBase.cpp index d67c66d..b739d76 100644 --- a/sheets/DocBase.cpp +++ b/sheets/DocBase.cpp @@ -52,6 +52,8 @@ #include "Map.h" #include "SheetAccessModel.h" +#include "ElapsedTime_p.h" + #include "part/View.h" // TODO: get rid of this dependency using namespace Calligra::Sheets; diff --git a/sheets/ElapsedTime_p.h b/sheets/ElapsedTime_p.h new file mode 100644 index 0000000..2ee60c8 --- /dev/null +++ b/sheets/ElapsedTime_p.h @@ -0,0 +1,90 @@ +/* This file is part of the KDE project + Copyright (C) 2012 Philip Van Hoof <phi...@codeminded.be> + (C) 2005-2006 Stefan Nikolaus <stefan.nikol...@kdemail.net> + (C) 2006 Fredrik Edemar <f_ede...@linux.se> + (C) 2005-2006 Raphael Langerhorst <raphael.langerho...@kdemail.net> + (C) 2004 Tomas Mecir <mec...@gmail.com> + (C) 2003 Norbert Andres <nand...@web.de> + (C) 2002 Philipp Mueller <philipp.muel...@gmx.de> + (C) 2000 David Faure <fa...@kde.org> + (C) 2000 Werner Trobin <tro...@kde.org> + (C) 2000-2006 Laurent Montel <mon...@kde.org> + (C) 1999, 2000 Torben Weis <w...@kde.org> + (C) 1999 Stephan Kulow <co...@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#ifndef ELAPSED_TIME_P_H +#define ELAPSED_TIME_P_H + +#include <kdebug.h> +#include <QTime> + +namespace Calligra +{ +namespace Sheets +{ + +class ElapsedTime +{ +public: + enum OutputMode { Default, PrintOnlyTime }; + +#ifdef NDEBUG + + ElapsedTime() {} + explicit ElapsedTime(QString const& , OutputMode = Default) {} + +#else // NDEBUG + + ElapsedTime() { + m_time.start(); + } + + explicit ElapsedTime(QString const & name, OutputMode mode = Default) + : m_name(name) { + m_time.start(); + if (mode != PrintOnlyTime) { + kDebug(36001) << QString("*** (" + name + ")... Starting measuring...").toLatin1().data(); + } + } + + ~ElapsedTime() { + uint milliSec = m_time.elapsed(); + uint min = static_cast<uint>(milliSec / (1000 * 60)); + milliSec -= (min * 60 * 1000); + uint sec = static_cast<uint>(milliSec / 1000); + milliSec -= sec * 1000; + + if (m_name.isNull()) + kDebug(36001) << QString("*** Elapsed time: %1 min %2 sec %3 msec").arg(min).arg(sec).arg(milliSec).toLatin1().data(); + else + kDebug(36001) << QString("*** (%1) Elapsed time: %2 min %3 sec %4 msec").arg(m_name).arg(min).arg(sec).arg(milliSec).toLatin1().data(); + } + +private: + QTime m_time; + QString m_name; + +#endif // NDEBUG +}; + +} // namespace Sheets +} // namespace Calligra + +#endif diff --git a/sheets/Global.h b/sheets/Global.h index 1759095..5ec27f6 100644 --- a/sheets/Global.h +++ b/sheets/Global.h @@ -37,51 +37,6 @@ namespace Calligra { namespace Sheets { - -class ElapsedTime -{ -public: - enum OutputMode { Default, PrintOnlyTime }; - -#ifdef NDEBUG - - ElapsedTime() {} - explicit ElapsedTime(QString const& , OutputMode = Default) {} - -#else // NDEBUG - - ElapsedTime() { - m_time.start(); - } - - explicit ElapsedTime(QString const & name, OutputMode mode = Default) - : m_name(name) { - m_time.start(); - if (mode != PrintOnlyTime) { - kDebug(36001) << QString("*** (" + name + ")... Starting measuring...").toLatin1().data(); - } - } - - ~ElapsedTime() { - uint milliSec = m_time.elapsed(); - uint min = (uint)(milliSec / (1000 * 60)); - milliSec -= (min * 60 * 1000); - uint sec = (uint)(milliSec / 1000); - milliSec -= sec * 1000; - - if (m_name.isNull()) - kDebug(36001) << QString("*** Elapsed time: %1 min %2 sec %3 msec").arg(min).arg(sec).arg(milliSec).toLatin1().data(); - else - kDebug(36001) << QString("*** (%1) Elapsed time: %2 min %3 sec %4 msec").arg(m_name).arg(min).arg(sec).arg(milliSec).toLatin1().data(); - } - -private: - QTime m_time; - QString m_name; - -#endif // NDEBUG -}; - /** * This namespace collects enumerations related to * pasting operations. diff --git a/sheets/RecalcManager.cpp b/sheets/RecalcManager.cpp index c5674f2..cfc7165 100644 --- a/sheets/RecalcManager.cpp +++ b/sheets/RecalcManager.cpp @@ -32,6 +32,7 @@ #include "Value.h" #include "ValueFormatter.h" #include "DocBase.h" +#include "ElapsedTime_p.h" #include <KoUpdater.h> diff --git a/sheets/part/CanvasBase.cpp b/sheets/part/CanvasBase.cpp index f973f40..c861e84 100644 --- a/sheets/part/CanvasBase.cpp +++ b/sheets/part/CanvasBase.cpp @@ -94,7 +94,7 @@ #include <KoZoomHandler.h> #include <KoPointerEvent.h> -// KSpread +// Sheets #include "CellStorage.h" #include "Doc.h" #include "Global.h" @@ -106,6 +106,7 @@ #include "Sheet.h" #include "Util.h" #include "Validity.h" +#include "ElapsedTime_p.h" // commands #include "commands/CopyCommand.h" diff --git a/sheets/part/Headers.cpp b/sheets/part/Headers.cpp index f29408f..f47e7d6 100644 --- a/sheets/part/Headers.cpp +++ b/sheets/part/Headers.cpp @@ -63,7 +63,7 @@ #include <KoPointerEvent.h> #include <KoGlobal.h> -// KSpread +// Sheets #include "CanvasBase.h" #include "Cell.h" #include "Doc.h" @@ -71,6 +71,7 @@ #include "RowColumnFormat.h" #include "RowFormatStorage.h" #include "Sheet.h" +#include "ElapsedTime_p.h" // commands #include "commands/RowColumnManipulators.h" diff --git a/sheets/part/View.cpp b/sheets/part/View.cpp index 6a12d45..a2e859b 100644 --- a/sheets/part/View.cpp +++ b/sheets/part/View.cpp @@ -103,7 +103,7 @@ #include <KoModeBoxFactory.h> #include <KoIcon.h> -// KSpread includes +// Sheets includes #include "ApplicationSettings.h" #include "BindingManager.h" #include "CalculationSettings.h" @@ -136,6 +136,7 @@ #include "ValueCalc.h" #include "ValueConverter.h" #include "PrintJob.h" +#include "ElapsedTime_p.h" // commands #include "commands/CopyCommand.h" -- 1.7.10.4
_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel