Skip to content

Commit

Permalink
- Silenced weird g++6 compiler warning messages re. indentation, wtf.
Browse files Browse the repository at this point in the history
  • Loading branch information
rncbc committed Jun 22, 2016
1 parent 476b200 commit fc4de78
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 59 deletions.
38 changes: 19 additions & 19 deletions src/qtractorEditRangeForm.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// qtractorEditRangeForm.cpp
//
/****************************************************************************
Copyright (C) 2005-2015, rncbc aka Rui Nuno Capela. All rights reserved.
Copyright (C) 2005-2016, rncbc aka Rui Nuno Capela. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -189,44 +189,44 @@ unsigned long qtractorEditRangeForm::rangeEnd (void) const
// Retrieve range option flags.
unsigned int qtractorEditRangeForm::rangeOptions (void) const
{
return m_options;
return m_options;
}


// Option flags accessors.
void qtractorEditRangeForm::setOption ( Option option, bool bOn )
{
if (bOn)
m_options |= (unsigned int) (option);
else
m_options &= ~(unsigned int) (option);
if (bOn)
m_options |= (unsigned int) (option);
else
m_options &= ~(unsigned int) (option);
}

bool qtractorEditRangeForm::isOption ( Option option ) const
{
return (m_options & (unsigned int) (option));
return (m_options & (unsigned int) (option));
}


// Update options settings.
void qtractorEditRangeForm::updateOptions (void)
{
++m_iUpdate;
m_ui.ClipsCheckBox->setChecked(m_options & Clips);
m_ui.ClipsCheckBox->setChecked(m_options & Clips);
m_ui.AutomationCheckBox->setChecked(m_options & Automation);
m_ui.LoopCheckBox->setChecked((m_options & Loop));
m_ui.PunchCheckBox->setChecked(m_options & Punch);
m_ui.MarkersCheckBox->setChecked(m_options & Markers);
m_ui.TempoMapCheckBox->setChecked(m_options & TempoMap);
--m_iUpdate;
m_ui.MarkersCheckBox->setChecked(m_options & Markers);
m_ui.TempoMapCheckBox->setChecked(m_options & TempoMap);
--m_iUpdate;
}


// Options changed.
void qtractorEditRangeForm::optionsChanged (void)
{
if (m_iUpdate > 0)
return;
if (m_iUpdate > 0)
return;

setOption(Clips, m_ui.ClipsCheckBox->isChecked());
setOption(Automation, m_ui.AutomationCheckBox->isChecked());
Expand All @@ -235,7 +235,7 @@ void qtractorEditRangeForm::optionsChanged (void)
setOption(Markers, m_ui.MarkersCheckBox->isChecked());
setOption(TempoMap, m_ui.TempoMapCheckBox->isChecked());

stabilizeForm();
stabilizeForm();
}


Expand Down Expand Up @@ -339,12 +339,12 @@ void qtractorEditRangeForm::stabilizeForm (void)
// Dialog acceptance.
void qtractorEditRangeForm::accept (void)
{
// Update options check-boxes.
qtractorOptions *pOptions = qtractorOptions::getInstance();
if (pOptions)
pOptions->iEditRangeOptions = m_options;
// Update options check-boxes.
qtractorOptions *pOptions = qtractorOptions::getInstance();
if (pOptions)
pOptions->iEditRangeOptions = m_options;

QDialog::accept();
QDialog::accept();
}


Expand Down
32 changes: 16 additions & 16 deletions src/qtractorEditRangeForm.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// qtractorEditRangeForm.h
//
/****************************************************************************
Copyright (C) 2005-2015, rncbc aka Rui Nuno Capela. All rights reserved.
Copyright (C) 2005-2016, rncbc aka Rui Nuno Capela. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -48,7 +48,7 @@ class qtractorEditRangeForm : public QDialog

// Retrieve the current range, if the case arises.
unsigned long rangeStart() const;
unsigned long rangeEnd() const;
unsigned long rangeEnd() const;

// Range option flags.
enum Option {
Expand All @@ -61,27 +61,27 @@ class qtractorEditRangeForm : public QDialog
TempoMap = 32
};

// Retrieve range option flags.
unsigned int rangeOptions() const;
// Retrieve range option flags.
unsigned int rangeOptions() const;

protected:

// Option flags accessors.
void setOption(Option option, bool bOn);
bool isOption(Option option) const;
// Option flags accessors.
void setOption(Option option, bool bOn);
bool isOption(Option option) const;

// Update options settings.
void updateOptions();
// Update options settings.
void updateOptions();

protected slots:

void optionsChanged();
void rangeChanged();
void optionsChanged();
void rangeChanged();
void formatChanged(int);
void valueChanged();
void stabilizeForm();

void accept();
void accept();

private:

Expand All @@ -95,11 +95,11 @@ protected slots:
unsigned long m_iSelectStart;
unsigned long m_iSelectEnd;

// Applicable options;
unsigned int m_options;
// Applicable options;
unsigned int m_options;

// Pseudo-mutex.
unsigned int m_iUpdate;
// Pseudo-mutex.
unsigned int m_iUpdate;
};


Expand Down
2 changes: 1 addition & 1 deletion src/qtractorEditRangeForm.ui
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<author>rncbc aka Rui Nuno Capela</author>
<comment>qtractor - An Audio/MIDI multi-track sequencer.

Copyright (C) 2005-2015, rncbc aka Rui Nuno Capela. All rights reserved.
Copyright (C) 2005-2016, rncbc aka Rui Nuno Capela. All rights reserved.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
40 changes: 20 additions & 20 deletions src/qtractorInstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,35 +392,35 @@ bool qtractorInstrumentList::load ( const QString& sFilename )
// File save method.
bool qtractorInstrumentList::save ( const QString& sFilename ) const
{
// Open and write into real file.
QFile file(sFilename);
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate))
return false;
// Open and write into real file.
QFile file(sFilename);
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate))
return false;

// A visula separator line.
const QString sepl = "; -----------------------------"
"------------------------------------------------";

// Write the file.
QTextStream ts(&file);
// Write the file.
QTextStream ts(&file);

ts << sepl << endl;
ts << sepl << endl;
ts << "; " << QObject::tr("Cakewalk Instrument Definition File") << endl;
#if 0
ts << ";" << endl;
ts << "; " << QTRACTOR_TITLE " - " << QObject::tr(QTRACTOR_SUBTITLE) << endl;
ts << "; " << QObject::tr("Version")
<< ": " QTRACTOR_VERSION << endl;
ts << "; " << QObject::tr("Build")
<< ": " __DATE__ " " __TIME__ << endl;
ts << ";" << endl;
ts << "; " << QTRACTOR_TITLE " - " << QObject::tr(QTRACTOR_SUBTITLE) << endl;
ts << "; " << QObject::tr("Version")
<< ": " QTRACTOR_VERSION << endl;
ts << "; " << QObject::tr("Build")
<< ": " __DATE__ " " __TIME__ << endl;
#endif
ts << ";" << endl;
ts << "; " << QObject::tr("File")
<< ": " << QFileInfo(sFilename).fileName() << endl;
ts << "; " << QObject::tr("Date")
<< ": " << QDate::currentDate().toString("MMM dd yyyy")
<< " " << QTime::currentTime().toString("hh:mm:ss") << endl;
ts << ";" << endl;
ts << ";" << endl;
ts << "; " << QObject::tr("File")
<< ": " << QFileInfo(sFilename).fileName() << endl;
ts << "; " << QObject::tr("Date")
<< ": " << QDate::currentDate().toString("MMM dd yyyy")
<< " " << QTime::currentTime().toString("hh:mm:ss") << endl;
ts << ";" << endl;

// - Patch Names...
ts << sepl << endl << endl;
Expand Down
6 changes: 3 additions & 3 deletions src/qtractorOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,9 @@ void qtractorOptions::saveOptions (void)
QStringListIterator iter1(instrumentFiles);
while (iter1.hasNext())
m_settings.setValue(sFilePrefix.arg(++iFile), iter1.next());
// Cleanup old entries, if any...
while (!m_settings.value(sFilePrefix.arg(++iFile)).isNull())
m_settings.remove(sFilePrefix.arg(iFile));
// Cleanup old entries, if any...
while (!m_settings.value(sFilePrefix.arg(++iFile)).isNull())
m_settings.remove(sFilePrefix.arg(iFile));
m_settings.endGroup();

// MIDI controller file list.
Expand Down

0 comments on commit fc4de78

Please sign in to comment.