gcc 4.8 seems to have a problem with connections directly
to a QPointer.
also, cleared a unused call wich resulted in error on OSX
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
There are many ways of iterating over lists in C++/Qt.
In the specific case of QStrings, it is known [1] that using
foreach with const references avoids the creation of new
QString objects in each iteration, reducing the time consumed
by the loops.
[1] https://blog.qt.io/blog/2009/01/23/iterating-efficiently/
Signed-off-by: Anselmo L. S. Melo <anselmo.melo@intel.com>
Fixing braces
Changing data plot save files to csv only
Fixing LinechartWidget::startLogging() as it no longer needs to worry about a proper file name being set.
Changing the order of the QGCFileDialog::getSaveFileName() function. The idea was to expand the existing QFileDialog version but as we removed the selectedFilter, we might as well make this more intuitive. The options argument is the one trully optional and should be last.
Adding an example to the documentation on how to go about figuring out what file type was returned by these functions.
Fixed function declarations and prototypes formatting while at it.
Changed the caption of a few file save dialogs with a more descriptive text (explicitly telling what is being saved).
This function is called automatically when a QSettings object is destroyed,
so is rarely needed to be called explicitly.
There are still some cases where
a QSettings object is passed-by-reference, so there I left the sync() calls as
it's unclear how permanent those objects are and if they'd call sync() before
application shutdown
Subclass of QMessageBox which re-implements the static public
functions. There are two reasons for this:
1) The QMessageBox implementation on OSX does now show the title
string. This leads to message boxes which don't make much sense. So on
OSX we set title to text and text to informative text.
2) If parent is NULL, we set parent to MainWindow::instance. This
prevents message boxes which can go behind MainWindow
There's no need to create multiple signals - connect() is fine with
connecting styleChanged(MainWindow::QGC_MAINWINDOW_STYLE) to a slot
with no parameters.