Skip to content

Commit

Permalink
Merge pull request #41 from carsonip/fix-typo
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
SokoloffA committed Nov 4, 2016
2 parents 157fd2e + 175ceb6 commit 7534d67
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions gui/kernel/project.cpp
Expand Up @@ -45,10 +45,10 @@

#define META_SIZE 4 * 1024

class ProjectStatte
class ProjectState
{
public:
explicit ProjectStatte(const Project *p):
explicit ProjectState(const Project *p):
mProject(p),
mCurrentPage(p->currentPage()),
mCurrentSheet(p->currentSheet())
Expand Down Expand Up @@ -217,7 +217,7 @@ void Project::tmpFileMerged()
************************************************/
void Project::update()
{
ProjectStatte state(this);
ProjectState state(this);
ProjectPage *curPage = 0;

mPages.clear();
Expand Down Expand Up @@ -324,7 +324,7 @@ void Project::setCurrentPage(ProjectPage *page)
if (mPreviewSheets.empty())
return;

ProjectStatte state(this);
ProjectState state(this);

if (page)
{
Expand Down Expand Up @@ -414,7 +414,7 @@ void Project::setCurrentSheet(int sheetNum)
if (mPreviewSheets.empty())
return;

ProjectStatte state(this);
ProjectState state(this);

sheetNum = qBound(0, sheetNum, mPreviewSheets.count()-1);
mCurrentSheet = mPreviewSheets.at(sheetNum);
Expand Down
8 changes: 4 additions & 4 deletions gui/kernel/tmppdffile.cpp
Expand Up @@ -256,15 +256,15 @@ void TmpPdfFile::writeSheets(QIODevice *out, const QList<Sheet *> &sheets) const
qint32 num = pagesNum + 1;
foreach(const Sheet *sheet, sheets)
{
int pegeNum = num;
int pageNum = num;
int resourcesNum = num + 1;
int contentsNum = num + 2;
num += 3;


// Page ............................
xref.insert(pegeNum, out->pos());
*out << pegeNum << " 0 obj\n";
xref.insert(pageNum, out->pos());
*out << pageNum << " 0 obj\n";
*out << "<<\n";
*out << "/Type /Page\n";
*out << "/Contents " << contentsNum << " 0 R\n";
Expand All @@ -275,7 +275,7 @@ void TmpPdfFile::writeSheets(QIODevice *out, const QList<Sheet *> &sheets) const
*out << ">>\n";
*out << "endobj\n";

pagesKids << QString("%1 0 R").arg(pegeNum);
pagesKids << QString("%1 0 R").arg(pageNum);
//..................................


Expand Down
14 changes: 7 additions & 7 deletions gui/render.cpp
Expand Up @@ -84,7 +84,7 @@ RenderWorker::RenderWorker(const QString &fileName, int resolution):
QObject(),
mSheetNum(0),
mResolution(resolution),
mBussy(false),
mBusy(false),
mPopplerDoc(0)
{
if (QFileInfo(fileName).exists())
Expand All @@ -109,10 +109,10 @@ QImage RenderWorker::renderSheet(int sheetNum)
if (!mPopplerDoc)
return QImage();

mBussy = true;
mBusy = true;
QImage img = doRenderSheet(mPopplerDoc, sheetNum, mResolution);
emit sheetReady(img, sheetNum);
mBussy = false;
mBusy = false;
return img;
}

Expand All @@ -125,7 +125,7 @@ QImage RenderWorker::renderPage(int sheetNum, const QRectF pageRect, int pageNum
if (!mPopplerDoc)
return QImage();

mBussy = true;
mBusy = true;
QImage img = doRenderSheet(mPopplerDoc, sheetNum, mResolution);

QSizeF printerSize = project->printer()->paperRect().size();
Expand Down Expand Up @@ -157,7 +157,7 @@ QImage RenderWorker::renderPage(int sheetNum, const QRectF pageRect, int pageNum
img = img.copy(rect);

emit pageReady(img, pageNum);
mBussy = false;
mBusy = false;
return img;
}

Expand Down Expand Up @@ -235,7 +235,7 @@ void Render::renderSheet(int sheetNum)
{
foreach (RenderWorker *worker, mWorkers)
{
if (!worker->isBussy())
if (!worker->isBusy())
{
startRenderSheet(worker, sheetNum);
return;
Expand All @@ -255,7 +255,7 @@ void Render::renderPage(int pageNum)
{
foreach (RenderWorker *worker, mWorkers)
{
if (!worker->isBussy())
if (!worker->isBusy())
{
startRenderPage(worker, pageNum);
return;
Expand Down
4 changes: 2 additions & 2 deletions gui/render.h
Expand Up @@ -45,7 +45,7 @@ class RenderWorker: public QObject
explicit RenderWorker(const QString &fileName, int resolution);
virtual ~RenderWorker();

bool isBussy() const { return mBussy; }
bool isBusy() const { return mBusy; }
QThread *thread() { return &mThread; }

public slots:
Expand All @@ -59,7 +59,7 @@ public slots:
private:
int mSheetNum;
int mResolution;
bool mBussy;
bool mBusy;
QThread mThread;
poppler::document *mPopplerDoc;
};
Expand Down

0 comments on commit 7534d67

Please sign in to comment.