const QString VERSION("2015.12.15");
inline QString addEsc(const QString& text){
- QString rc = text;
+ QString rc = text;
#if defined WIN32
- rc.replace("\\", "\\\\");
+ rc.replace("\\", "\\\\");
#endif
- return rc;
+ return rc;
}
/**
QString rc = text;
int start = 0;
while (start < rc.length()){
- int ix = text.indexOf('\\', start);
- if (ix < 0)
+ int ix = text.indexOf('\\', start);
+ if (ix < 0)
break;
- start += ix;
+ start += ix;
QChar replacement = 0;
switch (text[start + 1].toLatin1()) {
case 'n':
replacement = text[start + 1];
break;
}
- rc.replace(start, 2, replacement);
- start++;
+ rc.replace(start, 2, replacement);
+ start++;
}
return rc;
}
for (int ii = 0; ii < count; ii++){
QString line = ui->comboBoxTemplate->currentText();
QMap < QString, QString > placeholders;
- QString path = m_lastBaseDir.absoluteFilePath(
+ QString path = m_lastBaseDir.absoluteFilePath(
ReFileUtils::pathAppend(ui->tableWidget->item(ii, TC_PATH)->text(),
ui->tableWidget->item(ii, TC_NODE)->text()));
- placeholders.insert("full", addEsc(ReQStringUtils::nativePath(path)));
- path = ReFileUtils::nativePath(ui->tableWidget->item(ii, TC_PATH)->text());
- placeholders.insert("path", addEsc(path));
+ placeholders.insert("full", addEsc(ReQStringUtils::nativePath(path)));
+ path = ReFileUtils::nativePath(ui->tableWidget->item(ii, TC_PATH)->text());
+ placeholders.insert("path", addEsc(path));
placeholders.insert("ext", ui->tableWidget->item(ii, TC_EXT)->text());
placeholders.insert("node", ui->tableWidget->item(ii, TC_NODE)->text());
placeholders.insert("modified",
*/
void MainWindow::buildGlobalPlaceholders(QMap <QString, QString>& hash){
- hash.insert("filepatterns", ui->comboBoxFilePatterns->currentText());
+ hash.insert("filepatterns", ui->comboBoxFilePatterns->currentText());
hash.insert("base", m_lastBaseDir.absolutePath());
hash.insert("textpattern", addEsc(ui->comboBoxTextPattern->currentText()));
hash.insert("dirs", QString::number(m_statistics.m_dirs));
else{
QApplication::setOverrideCursor (QCursor(Qt::WaitCursor));
ui->pushButtonSearch->setEnabled(false);
- ui->pushButtonSearch->setEnabled(false);
+ ui->pushButtonSearch2->setEnabled(false);
if (m_finder == NULL)
m_finder = new FileFinder;
populateFinder(*m_finder);
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
- <layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0,0,0,0">
+ <layout class="QGridLayout" name="gridLayout" columnstretch="0,4,1,0,0,1,2">
<item row="3" column="0" colspan="2">
<widget class="QPushButton" name="pushButtonSearch">
<property name="toolTip">
</property>
</widget>
</item>
- <item row="1" column="5" colspan="2">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QCheckBox" name="checkBoxDirs">
- <property name="minimumSize">
- <size>
- <width>75</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Dirs</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBoxLinks">
- <property name="minimumSize">
- <size>
- <width>75</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>100</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Links</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
<item row="2" column="1">
<widget class="QComboBox" name="comboBoxTextPattern">
<property name="minimumSize">
</property>
</widget>
</item>
- <item row="2" column="5" colspan="2">
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QCheckBox" name="checkBoxRegExpr">
- <property name="minimumSize">
- <size>
- <width>130</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>200</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Regular expr.</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkBoxBinaryFiles">
- <property name="minimumSize">
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>200</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Binary files</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
<item row="2" column="2">
<widget class="QCheckBox" name="checkBoxTextIgnoreCase">
<property name="maximumSize">
</property>
</widget>
</item>
+ <item row="1" column="5">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QCheckBox" name="checkBoxDirs">
+ <property name="minimumSize">
+ <size>
+ <width>75</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Dirs</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxLinks">
+ <property name="minimumSize">
+ <size>
+ <width>75</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Links</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="5">
+ <layout class="QHBoxLayout" name="horizontalLayout_5" stretch="2,1,0">
+ <item>
+ <widget class="QCheckBox" name="checkBoxRegExpr">
+ <property name="minimumSize">
+ <size>
+ <width>130</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Regular expr.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="checkBoxBinaryFiles">
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Binary files</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
</layout>
</item>
</layout>