0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-26 17:59:08 +03:00
This commit is contained in:
Rodrigo Torres
2021-08-24 04:22:30 -03:00
parent fa6cbef6a7
commit 67d8146b9c
25 changed files with 360 additions and 44 deletions

View File

@@ -762,10 +762,18 @@ void PageDesignIntf::dropEvent(QGraphicsSceneDragDropEvent* event)
if (!isVar){
BandDesignIntf* parentBand = dynamic_cast<BandDesignIntf*>(ti->parentItem());
if (parentBand && parentBand->datasourceName().isEmpty()){
#if QT_VERSION < 0x060000
QRegExp dataSource("(?:\\$D\\{\\s*(.*)\\..*\\})");
if (dataSource.indexIn(data) != -1){
parentBand->setProperty("datasource",dataSource.cap(1));
}
#else
QRegularExpression dataSource("(?:\\$D\\{\\s*(.*)\\..*\\})");
QRegularExpressionMatch match = dataSource.match(data);
if(match.hasMatch()){
parentBand->setProperty("datasource", match.captured(1));
}
#endif
}
}
}