[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/utils/charm/trunk
From: Allen Winter <winter () kde ! org>
Date: 2008-10-07 19:54:15
Message-ID: 1223409255.552577.26334.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 868977 by winterz:
fixup some minor compiler warnings.
M +5 -5 Charm/EventEditorDelegate.cpp
M +2 -2 Charm/EventEditorDelegate.h
M +1 -1 Charm/IdleWidget.cpp
M +1 -1 Charm/Reports/CharmReport.cpp
M +1 -1 Charm/Reports/WeeklyTimeSheet3.cpp
M +1 -1 Charm/TimeTrackingSummaryWidget.cpp
M +1 -1 Core/SqlStorage.cpp
M +2 -2 Tools/TimesheetProcessor/CommandLine.cpp
--- trunk/playground/utils/charm/trunk/Charm/EventEditorDelegate.cpp #868976:868977
@@ -75,7 +75,7 @@
const QStyleOptionViewItem& option,
const QString& taskName,
const QString& timespan,
- float logDuration,
+ double logDuration,
EventState state ) const
{
painter->save();
@@ -165,7 +165,7 @@
}
-float EventEditorDelegate::logDuration( int duration ) const
+double EventEditorDelegate::logDuration( int duration ) const
{ // we rely on the compiler to optimize at compile time :-)
if( duration <= 0) {
return 0;
@@ -173,9 +173,9 @@
if( duration <= 3600 ) {
return 0.2 * 1.0 / 3600.0 * duration;
} else {
- const float log2 = std::log( 2.0 );
- const float hours = 1.0 / 3600 * duration;
- const float value = log( hours ) / log2;
+ const double log2 = std::log( 2.0 );
+ const double hours = 1.0 / 3600 * duration;
+ const double value = log( hours ) / log2;
return 0.2 * ( 1.0 + value );
}
}
--- trunk/playground/utils/charm/trunk/Charm/EventEditorDelegate.h #868976:868977
@@ -39,10 +39,10 @@
// and the painting during paintEvent)
QRect paint( QPainter*, const QStyleOptionViewItem& option,
const QString& taskName, const QString& timespan,
- float logDuration, EventState state ) const;
+ double logDuration, EventState state ) const;
// calculate the length for a visual representation of the event duration
- float logDuration( int seconds ) const;
+ double logDuration( int seconds ) const;
};
#endif
--- trunk/playground/utils/charm/trunk/Charm/IdleWidget.cpp #868976:868977
@@ -17,7 +17,7 @@
void IdleWidget::resizeEvent( QResizeEvent* )
{
- const float Ratio = 0.8;
+ const double Ratio = 0.8;
QSize wantedSize = Ratio * size();
if ( wantedSize.width() < Data::backdropPixmap().width() || wantedSize.height() \
< Data::backdropPixmap().height() ) {
m_backdrop = Data::backdropPixmap().scaled( wantedSize, Qt::KeepAspectRatio \
);
--- trunk/playground/utils/charm/trunk/Charm/Reports/CharmReport.cpp #868976:868977
@@ -36,7 +36,7 @@
}
}
-int pointSize( float relSize, float scale )
+int pointSize( double relSize, float scale )
{
return static_cast<int>( relSize * scale );
}
--- trunk/playground/utils/charm/trunk/Charm/Reports/WeeklyTimeSheet3.cpp \
#868976:868977 @@ -333,7 +333,7 @@
TimeSheetInfoList subscribed;
for ( int i = 0; i < timeSheetInfo.size(); ++i ) {
const TaskTreeItem& item = DATAMODEL->taskTreeItem( \
timeSheetInfo[i].taskId );
- if ( item.task().subscribed() || timeSheetInfo[i].total() > 0 && \
timeSheetInfo[i].aggregated ) { + if ( item.task().subscribed() || ( \
timeSheetInfo[i].total() > 0 && timeSheetInfo[i].aggregated ) ) { subscribed << \
timeSheetInfo[i]; }
}
--- trunk/playground/utils/charm/trunk/Charm/TimeTrackingSummaryWidget.cpp \
#868976:868977 @@ -269,7 +269,7 @@
void TimeTrackingSummaryWidget::slotGoStopToggled( bool on )
{
- Q_ASSERT( m_selectedSummary >= 0 && m_selectedSummary < m_summaries.size()
+ Q_ASSERT( ( m_selectedSummary >= 0 && m_selectedSummary < m_summaries.size() )
|| m_selectedSummary == -1 );
if ( on ) {
--- trunk/playground/utils/charm/trunk/Core/SqlStorage.cpp #868976:868977
@@ -558,7 +558,7 @@
{
Task dbTask = getTask(task.id());
- if (!dbTask.isValid() || dbTask.isValid() && !dbTask.subscribed())
+ if (!dbTask.isValid() || (dbTask.isValid() && !dbTask.subscribed()))
{
QSqlQuery query(database());
const char statement[] =
--- trunk/playground/utils/charm/trunk/Tools/TimesheetProcessor/CommandLine.cpp \
#868976:868977 @@ -15,13 +15,13 @@
m_mode(Mode_None), m_index(), m_userid()
{
opterr = 0;
- char ch;
+ int ch;
while ((ch = getopt(argc, argv, "hza:x:c:ri:u:")) != -1)
{
if (ch == '?')
{
// unparsable argument
- char option = optopt;
+ int option = optopt;
if (option == 'a')
{
throw UsageException(QObject::tr(
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic