|
a/src/qtgui/rclmain_w.cpp |
|
b/src/qtgui/rclmain_w.cpp |
|
... |
|
... |
1106 |
QMessageBox::Ok,
|
1106 |
QMessageBox::Ok,
|
1107 |
QMessageBox::NoButton);
|
1107 |
QMessageBox::NoButton);
|
1108 |
return;
|
1108 |
return;
|
1109 |
}
|
1109 |
}
|
1110 |
|
1110 |
|
1111 |
// Get list of all mime types in index. For this, we use a
|
1111 |
// All mime types in index.
|
1112 |
// wildcard field search on mtype
|
1112 |
vector<string> vdbtypes;
|
1113 |
Rcl::TermMatchResult matches;
|
1113 |
if (!rcldb->getAllDbMimeTypes(vdbtypes)) {
|
1114 |
if (!rcldb->termMatch(Rcl::Db::ET_WILD, "", "*", matches, -1, "mtype")) {
|
|
|
1115 |
QMessageBox::warning(0, tr("Error"),
|
1114 |
QMessageBox::warning(0, tr("Error"),
|
1116 |
tr("Index query error"),
|
1115 |
tr("Index query error"),
|
1117 |
QMessageBox::Ok,
|
1116 |
QMessageBox::Ok,
|
1118 |
QMessageBox::NoButton);
|
1117 |
QMessageBox::NoButton);
|
1119 |
return;
|
1118 |
return;
|
1120 |
}
|
1119 |
}
|
1121 |
|
|
|
1122 |
// Build the set of mtypes, stripping the prefix
|
|
|
1123 |
set<string> mtypesfromdb;
|
1120 |
set<string> mtypesfromdb;
|
1124 |
for (vector<Rcl::TermMatchEntry>::const_iterator it =
|
1121 |
mtypesfromdb.insert(vdbtypes.begin(), vdbtypes.end());
|
1125 |
matches.entries.begin();
|
|
|
1126 |
it != matches.entries.end(); it++) {
|
|
|
1127 |
mtypesfromdb.insert(it->term.substr(matches.prefix.size()));
|
|
|
1128 |
}
|
|
|
1129 |
|
1122 |
|
1130 |
// All types listed in mimeconf:
|
1123 |
// All types listed in mimeconf:
|
1131 |
vector<string> mtypesfromconfig = theconfig->getAllMimeTypes();
|
1124 |
vector<string> mtypesfromconfig = theconfig->getAllMimeTypes();
|
1132 |
|
1125 |
|
1133 |
// Intersect file system types with config types (those not in the
|
1126 |
// Intersect file system types with config types (those not in the
|