1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Testing - Inspector building on GH #329

Add GitHub Actions for TInspector build and clang-format check
Reorganize QT search to work with native Linux packages
Reorganize build-and-test workflow to have actions
This commit is contained in:
Pasukhin Dmitry
2025-02-02 16:35:20 +01:00
committed by GitHub
parent 16d36a47fc
commit 053e01ec68
9 changed files with 248 additions and 104 deletions

View File

@@ -59,8 +59,10 @@ QByteArray TreeModel_Tools::ToByteArray(const QString& theValue)
if (!theValue.startsWith("@ByteArray[") || !theValue.endsWith(']'))
return aStateArray;
QString aValue = theValue.mid(11, theValue.size() - 12);
QStringList lst = aValue.split(QRegExp("[\\s|,]"), QString::SkipEmptyParts);
QString aValue = theValue.mid(11, theValue.size() - 12);
#include <Standard_WarningsDisable.hxx>
QStringList lst = aValue.split(QRegExp("[\\s|,]"), QString::SkipEmptyParts);
#include <Standard_WarningsRestore.hxx>
for (QStringList::ConstIterator aByteId = lst.begin(); aByteId != lst.end(); ++aByteId)
{
int aBase = 10;
@@ -177,7 +179,9 @@ int TreeModel_Tools::GetTextWidth(const QString& theText, QObject*)
int aTextMargin = 10;
QFontMetrics aFontMetrics(QApplication::font());
QRect aBoundingRect = aFontMetrics.boundingRect(theText);
#include <Standard_WarningsDisable.hxx>
return qMax(aBoundingRect.width(), aFontMetrics.width(theText)) + aTextMargin * 2;
#include <Standard_WarningsRestore.hxx>
}
// =======================================================================