mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
Replace QSort function has been deprecated
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4898 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
parent
902037d278
commit
aded80e4ae
@ -59,6 +59,10 @@ DEFINES += QET_ALLOW_OVERRIDE_CTBTD_OPTION
|
||||
# Commenter la ligne ci-dessous pour desactiver l'option --config-dir
|
||||
DEFINES += QET_ALLOW_OVERRIDE_CD_OPTION
|
||||
|
||||
# warn on *any* usage of deprecated APIs
|
||||
#DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
|
||||
######################################################################
|
||||
|
||||
include(sources/PropertiesEditor/PropertiesEditor.pri)
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "diagramcontext.h"
|
||||
#include <QRegExp>
|
||||
#include "qet.h"
|
||||
#include <algorithm>
|
||||
|
||||
/**
|
||||
@return a list containing all the keys in the context object.
|
||||
@ -30,7 +31,7 @@ QList<QString> DiagramContext::keys(DiagramContext::KeyOrder order) const {
|
||||
if (order == Alphabetical) {
|
||||
qSort(keys_list);
|
||||
} else {
|
||||
qSort(keys_list.begin(), keys_list.end(), DiagramContext::stringLongerThan);
|
||||
std::sort(keys_list.begin(), keys_list.end(), DiagramContext::stringLongerThan);
|
||||
}
|
||||
return(keys_list);
|
||||
}
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "nameslist.h"
|
||||
#include "ui/elementpropertieseditorwidget.h"
|
||||
#include "eseventinterface.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
@ -749,7 +750,7 @@ QList<QGraphicsItem *> ElementScene::zItems(ItemOptions options) const {
|
||||
|
||||
// ordonne les parties par leur zValue
|
||||
if (options & SortByZValue) {
|
||||
qSort(all_items_list.begin(), all_items_list.end(), ElementScene::zValueLessThan);
|
||||
std::sort (all_items_list.begin(), all_items_list.end(), ElementScene::zValueLessThan);
|
||||
}
|
||||
|
||||
// rajoute eventuellement les bornes
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "qetgraphicsitem.h"
|
||||
#include "diagramcontext.h"
|
||||
#include "assignvariables.h"
|
||||
#include <algorithm>
|
||||
|
||||
class ElementTextItem;
|
||||
class QETProject;
|
||||
@ -248,7 +249,7 @@ inline QUuid Element::uuid() const {
|
||||
* @return the list of linked elements, the list is sorted by position
|
||||
*/
|
||||
inline QList <Element *> Element::linkedElements() {
|
||||
qSort(connected_elements.begin(), connected_elements.end(), comparPos);
|
||||
std::sort(connected_elements.begin(), connected_elements.end(), comparPos);
|
||||
return connected_elements;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include <QPrintPreviewWidget>
|
||||
#include <QPageSetupDialog>
|
||||
#include <algorithm>
|
||||
|
||||
/**
|
||||
Constructeur
|
||||
@ -400,7 +401,7 @@ void QETPrintPreviewDialog::updateZoomList() {
|
||||
// ajout du zoom en cours
|
||||
if (current_zoom_is_not_null && (!zooms_real.contains(current_zoom))) {
|
||||
zooms_real << current_zoom;
|
||||
qSort(zooms_real.begin(), zooms_real.end());
|
||||
std::sort(zooms_real.begin(), zooms_real.end());
|
||||
}
|
||||
|
||||
// remplissage de la liste deroulante
|
||||
|
@ -16,6 +16,7 @@
|
||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "qtextorientationwidget.h"
|
||||
#include <algorithm>
|
||||
|
||||
/**
|
||||
Constructeur
|
||||
@ -283,7 +284,7 @@ QString QTextOrientationWidget::getMostUsableStringForRadius(const qreal &radius
|
||||
// recupere les longueurs a disposition
|
||||
QList<qreal> available_lengths = text_size_hash_.values();
|
||||
// trie les longueurs par ordre croissant
|
||||
qSort(available_lengths.begin(), available_lengths.end());
|
||||
std::sort(available_lengths.begin(), available_lengths.end());
|
||||
// recherche la position ou l'on insererait le rayon
|
||||
QList<qreal>::const_iterator i = qUpperBound(available_lengths, radius);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user