Commit 7c392dec authored by Laurent Montel's avatar Laurent Montel 😁

Use QLatin1String

Fix compile

svn path=/trunk/KDE/kdesdk/cervisia/; revision=460281
parent 8fa63dfc
......@@ -1150,13 +1150,13 @@ void CervisiaPart::slotAnnotate()
void CervisiaPart::slotDiffBase()
{
showDiff(QString::fromLatin1("BASE"));
showDiff(QLatin1String("BASE"));
}
void CervisiaPart::slotDiffHead()
{
showDiff(QString::fromLatin1("HEAD"));
showDiff(QLatin1String("HEAD"));
}
......
......@@ -225,7 +225,7 @@ void Repository::Private::readConfig()
//
// In order to be able to read this group, we then have to manually add
// the port number to it.
QString repositoryGroup = QString::fromLatin1("Repository-") + location;
QString repositoryGroup = QLatin1String("Repository-") + location;
if( !config->hasGroup(repositoryGroup) )
{
// find the position of the first path separator
......
......@@ -100,10 +100,10 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod
// avoids auto resize when the text is changed
nofnlabel->setMinimumWidth(fontMetrics().width(i18n("%1 differences").arg(10000)));
backbutton = new QPushButton(QString::fromLatin1("&<<"), mainWidget);
backbutton = new QPushButton(QLatin1String("&<<"), mainWidget);
connect( backbutton, SIGNAL(clicked()), SLOT(backClicked()) );
forwbutton = new QPushButton(QString::fromLatin1("&>>"), mainWidget);
forwbutton = new QPushButton(QLatin1String("&>>"), mainWidget);
connect( forwbutton, SIGNAL(clicked()), SLOT(forwClicked()) );
connect( this, SIGNAL(user1Clicked()), SLOT(saveAsClicked()) );
......
......@@ -81,7 +81,7 @@ void GlobalIgnoreList::addEntry(const QString& entry)
// Bug #89215:
// Make sure '.' and '..' are always in the ignore list, so
// UpdateDirItem::maybeScanDir() doesn't loop endlessly.
addEntriesFromString(QString::fromLatin1(". .."));
addEntriesFromString(QLatin1String(". .."));
}
}
......@@ -92,7 +92,7 @@ void GlobalIgnoreList::setup()
.nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\
*.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe _$* *$";
addEntriesFromString(QString::fromLatin1(ignorestr));
addEntriesFromString(QLatin1String(ignorestr));
addEntriesFromString(QString::fromLocal8Bit(::getenv("CVSIGNORE")));
addEntriesFromFile(QDir::homeDirPath() + "/.cvsignore");
......
......@@ -25,6 +25,7 @@
#include <qlayout.h>
#include <qpushbutton.h>
#include <qregexp.h>
#include <kpushbutton.h>
//Added by qt3to4:
#include <QVBoxLayout>
#include <QGridLayout>
......@@ -236,7 +237,7 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name)
for (int i = 0; i < listview->columns(); ++i)
listview->setColumnWidthMode(i, Q3ListView::Manual);
listview->restoreLayout(&partConfig, QString::fromLatin1("HistoryListView"));
listview->restoreLayout(&partConfig, QLatin1String("HistoryListView"));
}
......@@ -244,7 +245,7 @@ HistoryDialog::~HistoryDialog()
{
saveDialogSize(partConfig, "HistoryDialog");
listview->saveLayout(&partConfig, QString::fromLatin1("HistoryListView"));
listview->saveLayout(&partConfig, QLatin1String("HistoryListView"));
}
......
......@@ -41,7 +41,7 @@ QString TagInfo::toString(bool prefixWithType) const
QString text;
if (prefixWithType)
{
text += typeToString() + QString::fromLatin1(": ");
text += typeToString() + QLatin1String(": ");
}
text += m_name;
......@@ -71,32 +71,32 @@ QString TagInfo::typeToString() const
QString LogInfo::createToolTipText(bool showTime) const
{
QString text(QString::fromLatin1("<nobr><b>"));
QString text(QLatin1String("<nobr><b>"));
text += Qt::escape(m_revision);
text += QString::fromLatin1("</b>&nbsp;&nbsp;");
text += QLatin1String("</b>&nbsp;&nbsp;");
text += Qt::escape(m_author);
text += QString::fromLatin1("&nbsp;&nbsp;<b>");
text += QLatin1String("&nbsp;&nbsp;<b>");
text += Qt::escape(dateTimeToString(showTime));
text += QString::fromLatin1("</b></nobr>");
text += QLatin1String("</b></nobr>");
if (!m_comment.isEmpty())
{
text += QString::fromLatin1("<pre>");
text += QLatin1String("<pre>");
text += Qt::escape(m_comment);
text += QString::fromLatin1("</pre>");
text += QLatin1String("</pre>");
}
if (!m_tags.isEmpty())
{
text += QString::fromLatin1("<i>");
text += QLatin1String("<i>");
for (TTagInfoSeq::const_iterator it = m_tags.begin();
it != m_tags.end(); ++it)
{
if (it != m_tags.begin() || m_comment.isEmpty())
text += QString::fromLatin1("<br>");
text += QLatin1String("<br>");
text += Qt::escape((*it).toString());
}
text += QString::fromLatin1("</i>");
text += QLatin1String("</i>");
}
return text;
......
......@@ -73,7 +73,7 @@ LogListViewItem::LogListViewItem(Q3ListView* list, const Cervisia::LogInfo& logI
setText(Tags, logInfo.tagsToString(Cervisia::TagInfo::Tag,
Cervisia::LogInfo::NoTagType,
QString::fromLatin1(", ")));
QLatin1String(", ")));
}
......@@ -135,13 +135,13 @@ LogListView::LogListView(KConfig& cfg, QWidget *parent, const char *name)
for (int i = 0; i < columns(); ++i)
setColumnWidthMode(i, Manual);
restoreLayout(&partConfig, QString::fromLatin1("LogList view"));
restoreLayout(&partConfig, QLatin1String("LogList view"));
}
LogListView::~LogListView()
{
saveLayout(&partConfig, QString::fromLatin1("LogList view"));
saveLayout(&partConfig, QLatin1String("LogList view"));
}
......
......@@ -262,14 +262,14 @@ QStringList splitLine(QString line, char delim)
const QStringList fetchBranches(CvsService_stub* cvsService, QWidget* parent)
{
return FetchBranchesAndTags(QString::fromLatin1("branch"), cvsService,
return FetchBranchesAndTags(QLatin1String("branch"), cvsService,
parent);
}
const QStringList fetchTags(CvsService_stub* cvsService, QWidget* parent)
{
return FetchBranchesAndTags(QString::fromLatin1("revision"), cvsService,
return FetchBranchesAndTags(QLatin1String("revision"), cvsService,
parent);
}
......
......@@ -235,7 +235,7 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService,
for (int i = 0; i < m_repoList->columns(); ++i)
m_repoList->setColumnWidthMode(i, Q3ListView::Manual);
m_repoList->restoreLayout(&m_partConfig, QString::fromLatin1("RepositoryListView"));
m_repoList->restoreLayout(&m_partConfig, QLatin1String("RepositoryListView"));
}
......@@ -243,7 +243,7 @@ RepositoryDialog::~RepositoryDialog()
{
saveDialogSize(m_partConfig, "RepositoryDialog");
m_repoList->saveLayout(&m_partConfig, QString::fromLatin1("RepositoryListView"));
m_repoList->saveLayout(&m_partConfig, QLatin1String("RepositoryListView"));
delete m_serviceConfig;
}
......@@ -278,7 +278,7 @@ void RepositoryDialog::readConfigFile()
RepositoryListItem* ritem = static_cast<RepositoryListItem*>(item);
// read entries from cvs DCOP service configuration
m_serviceConfig->setGroup(QString::fromLatin1("Repository-") +
m_serviceConfig->setGroup(QLatin1String("Repository-") +
ritem->repository());
kdDebug() << "(1) RepositoryDialog::readConfigFile(): repository = "
......@@ -490,7 +490,7 @@ void RepositoryDialog::slotSelectionChanged()
void RepositoryDialog::writeRepositoryData(RepositoryListItem* item)
{
// write entries to cvs DCOP service configuration
m_serviceConfig->setGroup(QString::fromLatin1("Repository-") +
m_serviceConfig->setGroup(QLatin1String("Repository-") +
item->repository());
kdDebug() << "(1) RepositoryDialog::writeRepositoryData(): repository = "
......
......@@ -55,7 +55,7 @@ namespace
inline QPixmap LoadIcon(const char* iconName)
{
KIconLoader* loader = KGlobal::instance()->iconLoader();
return loader->loadIcon(QString::fromLatin1(iconName), KIcon::NoGroup,
return loader->loadIcon(QLatin1String(iconName), KIcon::NoGroup,
KIcon::SizeMedium);
}
}
......
......@@ -66,13 +66,13 @@ UpdateView::UpdateView(KConfig& partConfig, QWidget *parent, const char *name)
for (int col = 0; col < columns(); ++col)
setColumnWidthMode(col, Q3ListView::Manual);
restoreLayout(&m_partConfig, QString::fromLatin1("UpdateView"));
restoreLayout(&m_partConfig, QLatin1String("UpdateView"));
}
UpdateView::~UpdateView()
{
saveLayout(&m_partConfig, QString::fromLatin1("UpdateView"));
saveLayout(&m_partConfig, QLatin1String("UpdateView"));
}
......@@ -577,8 +577,8 @@ void UpdateView::processUpdateLine(QString str)
updateItem(str.mid(2), status, false);
}
const QString removedFileStart(QString::fromLatin1("cvs server: "));
const QString removedFileEnd(QString::fromLatin1(" is no longer in the repository"));
const QString removedFileStart(QLatin1String("cvs server: "));
const QString removedFileEnd(QLatin1String(" is no longer in the repository"));
if (str.startsWith(removedFileStart) && str.endsWith(removedFileEnd))
{
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment