Mercurial > hg > easyhg
comparison src/mainwindow.cpp @ 429:6a9756700fd1
Compile fix, plural fix
author | Chris Cannam |
---|---|
date | Fri, 24 Jun 2011 09:28:31 +0100 |
parents | ad106f5fe75f |
children | ff2306c67852 |
comparison
equal
deleted
inserted
replaced
428:a47eac9c7fea | 429:6a9756700fd1 |
---|---|
635 QString s = QFileInfo(file).suffix(); | 635 QString s = QFileInfo(file).suffix(); |
636 if (s != "") suffixes.insert(s); | 636 if (s != "") suffixes.insert(s); |
637 } | 637 } |
638 | 638 |
639 QString directory; | 639 QString directory; |
640 bool dirCount = 0; | 640 int dirCount = 0; |
641 foreach (QString file, files) { | 641 foreach (QString file, files) { |
642 QString d = QFileInfo(file).path(); | 642 QString d = QFileInfo(file).path(); |
643 if (d != directory) { | 643 if (d != directory) { |
644 ++dirCount; | 644 ++dirCount; |
645 directory = d; | 645 directory = d; |
1252 } | 1252 } |
1253 | 1253 |
1254 //!!! should find available port as well | 1254 //!!! should find available port as well |
1255 | 1255 |
1256 QTextStream ts(&msg); | 1256 QTextStream ts(&msg); |
1257 ts << QString("<qt><h3>%1</h3><p>%2</p><p>%3</p>") | 1257 ts << QString("<qt><h3>%1</h3><p>%2</p>") |
1258 .arg(tr("Sharing Repository")) | 1258 .arg(tr("Sharing Repository")) |
1259 .arg(tr("Your local repository is now being made temporarily available via HTTP for workgroup access.")) | 1259 .arg(tr("Your local repository is now being made temporarily available via HTTP for workgroup access.")); |
1260 .arg(tr("Users who have network access to your computer can now clone your repository by using the following URL as a remote location:")); | 1260 if (addrs.size() > 1) { |
1261 ts << QString("<p>%3</p>") | |
1262 .arg(tr("Users who have network access to your computer can now clone your repository, by using one of the following URLs as a remote location:")); | |
1263 } else { | |
1264 ts << QString("<p>%3</p>") | |
1265 .arg(tr("Users who have network access to your computer can now clone your repository, by using the following URL as a remote location:")); | |
1266 } | |
1261 foreach (QString addr, addrs) { | 1267 foreach (QString addr, addrs) { |
1262 ts << QString("<pre> http://%1:8000</pre>").arg(xmlEncode(addr)); | 1268 ts << QString("<pre> http://%1:8000</pre>").arg(xmlEncode(addr)); |
1263 } | 1269 } |
1264 ts << tr("<p>Press Close to terminate this server, end remote access, and return.</p>"); | 1270 ts << tr("<p>Press Close to terminate this server, end remote access, and return.</p>"); |
1265 ts.flush(); | 1271 ts.flush(); |