mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
fix deprecated warning QHash
This function is obsolete. Use QMultiHash instead. This function was introduced in Qt 4.3 - 5.14
This commit is contained in:
committed by
Laurent Trinques
parent
b9ed45c8a3
commit
21c3c09341
@@ -16,6 +16,8 @@
|
|||||||
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
#include <QMultiHash>
|
||||||
|
|
||||||
#include "conductor.h"
|
#include "conductor.h"
|
||||||
#include "conductorsegment.h"
|
#include "conductorsegment.h"
|
||||||
#include "conductorsegmentprofile.h"
|
#include "conductorsegmentprofile.h"
|
||||||
@@ -236,7 +238,7 @@ void Conductor::updateConductorPath(const QPointF &p1, Qet::Orientation o1, cons
|
|||||||
qreal v_diff = (qAbs(new_rect.height()) - qAbs(profile_height)) * getSign(profile_height);
|
qreal v_diff = (qAbs(new_rect.height()) - qAbs(profile_height)) * getSign(profile_height);
|
||||||
|
|
||||||
// applique les differences aux segments
|
// applique les differences aux segments
|
||||||
QHash<ConductorSegmentProfile *, qreal> segments_lengths;
|
QMultiHash<ConductorSegmentProfile *, qreal> segments_lengths;
|
||||||
segments_lengths.unite(shareOffsetBetweenSegments(h_diff, conductor_profile.horizontalSegments()));
|
segments_lengths.unite(shareOffsetBetweenSegments(h_diff, conductor_profile.horizontalSegments()));
|
||||||
segments_lengths.unite(shareOffsetBetweenSegments(v_diff, conductor_profile.verticalSegments()));
|
segments_lengths.unite(shareOffsetBetweenSegments(v_diff, conductor_profile.verticalSegments()));
|
||||||
|
|
||||||
@@ -257,7 +259,7 @@ void Conductor::updateConductorPath(const QPointF &p1, Qet::Orientation o1, cons
|
|||||||
|
|
||||||
// coefficient et offset a utiliser pour ce point
|
// coefficient et offset a utiliser pour ce point
|
||||||
qreal coeff = csp -> isHorizontal ? horiz_coeff : verti_coeff;
|
qreal coeff = csp -> isHorizontal ? horiz_coeff : verti_coeff;
|
||||||
qreal offset_applied = segments_lengths[csp];
|
qreal offset_applied = segments_lengths.value(csp);
|
||||||
|
|
||||||
// applique l'offset et le coeff au point
|
// applique l'offset et le coeff au point
|
||||||
if (csp -> isHorizontal) {
|
if (csp -> isHorizontal) {
|
||||||
|
|||||||
Reference in New Issue
Block a user