summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-12-26 03:48:32 (UTC)
committer llornkcor <llornkcor>2002-12-26 03:48:32 (UTC)
commitf736bf0ae774159a80a97b9492d7624e7caf07a3 (patch) (unidiff)
tree6e66396c264e2d878920ba273487c81abe7a474e
parent451d6a8692cf65d970b0c582e96e8a59072df191 (diff)
downloadopie-f736bf0ae774159a80a97b9492d7624e7caf07a3.zip
opie-f736bf0ae774159a80a97b9492d7624e7caf07a3.tar.gz
opie-f736bf0ae774159a80a97b9492d7624e7caf07a3.tar.bz2
added setDocFile function to change the filename needs more work
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katedocument.cpp10
-rw-r--r--noncore/apps/tinykate/libkate/document/katedocument.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.cpp b/noncore/apps/tinykate/libkate/document/katedocument.cpp
index 10bc976..df1de8d 100644
--- a/noncore/apps/tinykate/libkate/document/katedocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katedocument.cpp
@@ -328,6 +328,7 @@ void KateDocument::openURL(const QString &filename)
328 328
329bool KateDocument::saveFile() 329bool KateDocument::saveFile()
330{ 330{
331
331 QFile f( m_file ); 332 QFile f( m_file );
332 if ( !f.open( IO_WriteOnly ) ) 333 if ( !f.open( IO_WriteOnly ) )
333 return false; // Error 334 return false; // Error
@@ -1925,7 +1926,8 @@ void KateDocument::updateLines(int startLine, int endLine, int flags, int cursor
1925 updateMaxLength(textLine); 1926 updateMaxLength(textLine);
1926 } 1927 }
1927 endCtx = textLine->getContext(); 1928 endCtx = textLine->getContext();
1928 qDebug("DOHIGHLIGHT"); 1929// qDebug("DOHIGHLIGHT");
1930
1929 ctxNum = m_highlight->doHighlight(ctxNum,textLine); 1931 ctxNum = m_highlight->doHighlight(ctxNum,textLine);
1930 textLine->setContext(ctxNum); 1932 textLine->setContext(ctxNum);
1931 line++; 1933 line++;
@@ -3030,6 +3032,12 @@ void KateDocument::setDocName (QString docName)
3030 emit nameChanged (this); 3032 emit nameChanged (this);
3031} 3033}
3032 3034
3035void KateDocument::setDocFile (QString docFile)
3036{
3037 m_file = docFile;
3038 emit fileNameChanged ();
3039}
3040
3033void KateDocument::setMTime() 3041void KateDocument::setMTime()
3034{ 3042{
3035 if (fileInfo && !fileInfo->fileName().isEmpty()) { 3043 if (fileInfo && !fileInfo->fileName().isEmpty()) {
diff --git a/noncore/apps/tinykate/libkate/document/katedocument.h b/noncore/apps/tinykate/libkate/document/katedocument.h
index 220d188..356541f 100644
--- a/noncore/apps/tinykate/libkate/document/katedocument.h
+++ b/noncore/apps/tinykate/libkate/document/katedocument.h
@@ -454,6 +454,7 @@ class KateDocument: public Kate::Document
454 QString docName () {return myDocName;}; 454 QString docName () {return myDocName;};
455 455
456 void setDocName (QString docName); 456 void setDocName (QString docName);
457 void setDocFile (QString docFile);
457 458
458 public slots: 459 public slots:
459 /** Reloads the current document from disk if possible */ 460 /** Reloads the current document from disk if possible */