| 97 | } |
| 98 | |
| 99 | bool BatchFindReplace::tranInputKeyword(QString& findKeyWord, QStringList& outputKeyWordList) |
| 100 | { |
| 101 | //�ѿհ��ַ����ո����\t \r\n ���ַ������滻Ϊ�ո� |
| 102 | QRegExp re("\\s"); |
| 103 | findKeyWord.replace(re, QString(" ")); |
| 104 | |
| 105 | //�ٽ��пո�ָ����� |
| 106 | outputKeyWordList = findKeyWord.split(" "); |
| 107 | |
| 108 | if (outputKeyWordList.size() > 20000) |
| 109 | { |
| 110 | ui.statusBar->showMessage(tr("Max find key word 20000 !"), 10000); |
| 111 | return false; |
| 112 | } |
| 113 | |
| 114 | //ɾ��ÿһ���յ�Ԫ�� |
| 115 | for (int i = outputKeyWordList.size() - 1; i >= 0; --i) |
| 116 | { |
| 117 | if (outputKeyWordList[i].trimmed().isEmpty()) |
| 118 | { |
| 119 | outputKeyWordList.removeAt(i); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | if (outputKeyWordList.isEmpty()) |
| 124 | { |
| 125 | return false; |
| 126 | } |
| 127 | |
| 128 | return true; |
| 129 | } |
| 130 | |
| 131 | void BatchFindReplace::on_freshBtClick() |
| 132 | { |