summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kozadaev <denis@dilos.org>2023-06-02 20:49:50 +0300
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-06-03 13:59:43 +0900
commit8b02e37929a3464df986926213f548ff96e4f09d (patch)
tree6e3ad24375489566d6d4cfdff5177180cd4f2663
parent9afce99921749edee7de137877a7898742bc93b5 (diff)
downloadtdesdk-8b02e37929a3464df986926213f548ff96e4f09d.tar.gz
tdesdk-8b02e37929a3464df986926213f548ff96e4f09d.zip
SunOS cosmetic changes
Signed-off-by: Denis Kozadaev <denis@dilos.org> (cherry picked from commit 4dabbe71b09383cba554e9338c059e5ed3d54e6c)
-rw-r--r--kmtrace/kmtrace.cpp3
-rw-r--r--umbrello/umbrello/associationwidget.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/kmtrace/kmtrace.cpp b/kmtrace/kmtrace.cpp
index 9cf5267f..9e5007fe 100644
--- a/kmtrace/kmtrace.cpp
+++ b/kmtrace/kmtrace.cpp
@@ -1,5 +1,8 @@
#include <tqintdict.h>
#include <stdio.h>
+#ifdef Q_OS_SOLARIS
+#include <strings.h> /* index(), rindex() */
+#endif
#include <tqstringlist.h>
#include <tqstrlist.h>
#include <tqtextstream.h>
diff --git a/umbrello/umbrello/associationwidget.cpp b/umbrello/umbrello/associationwidget.cpp
index 9c5f7ba4..0e2ec525 100644
--- a/umbrello/umbrello/associationwidget.cpp
+++ b/umbrello/umbrello/associationwidget.cpp
@@ -1893,7 +1893,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
const int y0 = p0.y();
const int x1 = p1.x();
const int y1 = p1.y();
- double r = sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) / 2;
+ double r = sqrt((double)(x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) / 2;
if (textWidth > r)
r = textWidth;
// swap textCenter{X,Y} to convert from TQt coord.system.