[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/office/kile/src
From: Michel Ludwig <michel.ludwig () kdemail ! net>
Date: 2008-08-02 19:33:41
Message-ID: 1217705621.232147.26644.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 841215 by mludwig:
-- QT3 warnings.
M +11 -10 dialogs/managetemplatesdialog.cpp
M +2 -2 dialogs/tabular/newtabulardialog.cpp
M +15 -14 kiledocmanager.cpp
--- trunk/extragear/office/kile/src/dialogs/managetemplatesdialog.cpp #841214:841215
@@ -20,7 +20,6 @@
#include <QGridLayout>
#include <QLayout>
#include <QLabel>
-#include <QToolTip>
#include <QTreeWidget>
#include <KApplication>
@@ -74,7 +73,8 @@
m_templateType = KileDocument::Extensions().determineDocumentType(sourceURL);
- QWidget *page = new QWidget(this , "managetemplates_mainwidget");
+ QWidget *page = new QWidget(this);
+ page->setObjectName("managetemplates_mainwidget");
setMainWidget(page);
QGridLayout *topLayout = new QGridLayout();
topLayout->setMargin(0);
@@ -85,7 +85,7 @@
QString fileName = m_sourceURL.fileName();
//remove the extension
- int dotPos = fileName.findRev('.');
+ int dotPos = fileName.lastIndexOf('.');
if (dotPos >= 0) {
fileName = fileName.mid(0, dotPos);
}
@@ -122,7 +122,7 @@
clearSelectionButton->setIcon(KIcon("edit-clear-locationbar"));
int buttonSize = clearSelectionButton->sizeHint().height();
clearSelectionButton->setFixedSize(buttonSize, buttonSize);
- QToolTip::add(clearSelectionButton, i18n("Clear Selection"));
+ clearSelectionButton->setToolTip(i18n("Clear Selection"));
connect(clearSelectionButton, SIGNAL(clicked()), this, SLOT(clearSelection()));
topLayout->addWidget(clearSelectionButton, 3, 2, Qt::AlignRight);
@@ -145,7 +145,8 @@
setDefaultButton(Ok);
showButtonSeparator(true);
- QWidget *page = new QWidget(this, "managetemplates_mainwidget");
+ QWidget *page = new QWidget(this);
+ page->setObjectName("managetemplates_mainwidget");
setMainWidget(page);
QVBoxLayout *topLayout = new QVBoxLayout();
topLayout->setMargin(0);
@@ -155,8 +156,8 @@
m_templateList = new QTreeWidget(page);
m_templateList->setSortingEnabled(false);
m_templateList->setHeaderLabels(QStringList() << i18nc("marked", "M")
- << i18n("Existing Templates")
- << i18n("Document Type"));
+ << i18n("Existing Templates")
+ << i18n("Document Type"));
m_templateList->setAllColumnsShowFocus(true);
m_templateList->setRootIsDecorated(false);
@@ -244,12 +245,12 @@
return;
}
- if (!KIO::NetAccess::exists(iconURL, true, kapp->mainWidget())) {
+ if (!KIO::NetAccess::exists(iconURL, true, this)) {
KMessageBox::error(this, i18n("Sorry, but the icon file: %1\ndoes not seem to \
exist. Please choose a new icon.", icon)); return;
}
- if (!KIO::NetAccess::exists(m_sourceURL, true, kapp->mainWidget())) {
+ if (!KIO::NetAccess::exists(m_sourceURL, true, this)) {
KMessageBox::error(this, i18n("Sorry, but the file: %1\ndoes not seem to exist. \
Maybe you forgot to save the file?", m_sourceURL.prettyUrl())); return;
}
@@ -296,7 +297,7 @@
KileTemplate::Info templateInfo = templateItem->getTemplateInfo();
- if (!(KIO::NetAccess::exists(KUrl::fromPathOrUrl(templateInfo.path), false, \
kapp->mainWidget()) && \
(KIO::NetAccess::exists(KUrl::fromPathOrUrl(templateInfo.icon), false, \
kapp->mainWidget()) || !QFileInfo(templateInfo.icon).exists()))) { + if \
(!(KIO::NetAccess::exists(KUrl::fromPathOrUrl(templateInfo.path), false, this) && \
(KIO::NetAccess::exists(KUrl::fromPathOrUrl(templateInfo.icon), false, this)|| \
!QFileInfo(templateInfo.icon).exists()))) { KMessageBox::error(this, i18n("Sorry, \
but you do not have the necessary permissions to remove the selected template.")); \
return false; }
--- trunk/extragear/office/kile/src/dialogs/tabular/newtabulardialog.cpp \
#841214:841215 @@ -709,10 +709,10 @@
if(optionlist.count() > 2) {
// ok, let's enable it
m_cmbParameter->setEnabled(true);
- m_cmbParameter->insertItem(QString());
+ m_cmbParameter->addItem(QString());
// insert some options
for(int i = 1; i < optionlist.count() - 1; ++i) {
- m_cmbParameter->insertItem(optionlist[i]);
+ m_cmbParameter->addItem(optionlist[i]);
}
}
}
--- trunk/extragear/office/kile/src/kiledocmanager.cpp #841214:841215
@@ -81,10 +81,11 @@
{
Manager::Manager(KileInfo *info, QObject *parent, const char *name) :
- QObject(parent, name),
+ QObject(parent),
m_ki(info),
m_progressDialog(NULL)
{
+ setObjectName(name);
m_editor = KTextEditor::EditorChooser::editor();
//FIXME: check whether this is still needed
// KTextEditor::Document::setFileChangedDialogsActivated (true);
@@ -422,9 +423,9 @@
if(itms.count() == 0 || ( closingproject && oneItem )) {
KILE_DEBUG() << "\tremoving " << docinfo << " count = " << \
m_textInfoList.count();
- m_textInfoList.remove(docinfo);
+ m_textInfoList.removeAll(docinfo);
- emit ( closingDocument ( docinfo ) );
+ emit(closingDocument(docinfo));
cleanupDocumentInfoForProjectItems(docinfo);
delete docinfo;
@@ -781,7 +782,7 @@
}
}
else {
- autosaveWarnings.remove(url.path());
+ autosaveWarnings.removeAll(url.path());
}
}
if(amAutoSaving && fi.size() > 0) { // the size check ensures that we don't save \
empty files (to prevent something like #125809 in the future). @@ -792,7 +793,7 @@
// get the right permissions, start with safe default
mode_t perms = 0600;
KIO::UDSEntry fentry;
- if (KIO::NetAccess::stat (url, fentry, kapp->mainWidget())) {
+ if (KIO::NetAccess::stat (url, fentry, m_ki->mainWindow())) {
KILE_DEBUG () << "stating successful: " << url.prettyUrl();
KFileItem item (fentry, url);
perms = item.permissions();
@@ -800,9 +801,9 @@
// first del existing file if any, than copy over the file we have
// failure if a: the existing file could not be deleted, b: the file could not \
be copied
- if((!KIO::NetAccess::exists( backupUrl, false, kapp->mainWidget())
- || KIO::NetAccess::del( backupUrl, kapp->mainWidget()))
- && KIO::NetAccess::file_copy(url, backupUrl, kapp->mainWidget())) {
+ if((!KIO::NetAccess::exists( backupUrl, false, m_ki->mainWindow())
+ || KIO::NetAccess::del( backupUrl, m_ki->mainWindow()))
+ && KIO::NetAccess::file_copy(url, backupUrl, m_ki->mainWindow())) {
KILE_DEBUG() << "backing up successful (" << url.prettyUrl() << " -> \
"<<backupUrl.prettyUrl() << ")"; }
else {
@@ -920,7 +921,7 @@
if(info->getType() == KileDocument::LaTeX) {
saveURL = Info::makeValidTeXURL(saveURL, m_ki->extensions()->isTexFile(saveURL), \
false); // don't check for file existence }
- if(KIO::NetAccess::exists(saveURL, true, kapp->mainWidget())) { // check for \
writing possibility + if(KIO::NetAccess::exists(saveURL, true, m_ki->mainWindow())) \
{ // check for writing possibility int r = \
KMessageBox::warningContinueCancel(m_ki->mainWindow(), i18n("A file with the name \
\"%1\" exists already. Do you want to overwrite it ?", saveURL.fileName()), \
i18n("Overwrite File ?"), KGuiItem(i18n("&Overwrite"))); if(r != \
KMessageBox::Continue) { continue;
@@ -1103,7 +1104,7 @@
if (dlg->exec())
{
KILE_DEBUG()<< "\tdialog executed";
- KILE_DEBUG() << "\t" << dlg->name() << " " << dlg->location();
+ KILE_DEBUG() << "\t" << dlg->objectName() << " " << dlg->location();
KileProject *project = dlg->project();
@@ -1605,7 +1606,7 @@
}
if (close) {
- m_projects.remove(project);
+ m_projects.removeAll(project);
emit removeFromProjectView(project);
delete project;
emit(updateModeStatus());
@@ -1655,7 +1656,7 @@
const QStringList templist = KileConfig::cleanUpFileExtensions().split(" ");
const QString fileName = fi.fileName();
const QString dirPath = fi.absolutePath();
- const QString baseName = fi.baseName(true);
+ const QString baseName = fi.completeBaseName();
for (int i=0; i < templist.count(); ++i) {
fi.setFile( dirPath + '/' + baseName + templist[i] );
@@ -1686,8 +1687,8 @@
}
else {
for(int i = 0; i < extlist.count(); ++i) {
- QFile file( dirPath + '/' + baseName + extlist[i] );
- KILE_DEBUG() << "About to remove file = " << file.name();
+ QFile file(dirPath + '/' + baseName + extlist[i]);
+ KILE_DEBUG() << "About to remove file = " << file.fileName();
file.remove();
}
m_ki->logWidget()->printMessage(KileTool::Info,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic