Arquivos
client/main.cpp
T
Juan Carlos Cornejo 18d32bda91 Major bugfixes.
1) Fixed a bug that prevented directories on the server to be properly
deleted.

2) Fixed a bug that would cause files and directories to be deleted
often, and then re-uploaded. This was due to a missing comparison.

3) Serialized the directory creation, making sure that it was successful
before trying to create the next one, which may have been a
subdirectory.

4) Fixed the issue with the GUI freezing when it was waiting for a sync
to happen if the user tried to quit.

5) Fixed an issue that if a directory existed with the same Remote or
Local directory name, weird stuff would happen! This was due to an
incorrect comparison.

6) Fixed the issue where the system tray icon would not change when a
conflict occurred. (Apparently I had accidentally removed this when I
made the change to multiple accounts).

7) Added two new buttons to clear the log and clear & save the log.
Useful when debugging :) But useful in general, I suppose.

Possibly some other fixes, but now I forget them exactly. Probably just
some lost pointers and the like that I found :)
2012-02-15 08:55:13 +01:00

56 linhas
1.9 KiB
C++

/******************************************************************************
* Copyright 2011 Juan Carlos Cornejo jc2@paintblack.com
*
* This file is part of owncloud_sync.
*
* owncloud_sync is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* owncloud_sync is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with owncloud_sync. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#include <QtGui/QApplication>
#include "SyncWindow.h"
#include <QSharedMemory>
#include <QMessageBox>
int quitOtherInstanceRunning()
{
QMessageBox box;
box.setText(QMessageBox::tr("Either another instance is already running or "
"the last instance crashed. You may try running"
" this again to clear it."));
box.setDefaultButton(QMessageBox::Ok);
box.exec();
return -1;
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// Technique for having only one application running at the same time per
// computer.
QSharedMemory sharedMemory;
sharedMemory.setKey("8SyGEyz2kcI0UNrqxc7wcuKLjD1pSL8GezlBM1W0QckgpjMon0");
if(sharedMemory.attach()) {
return quitOtherInstanceRunning();
}
if (!sharedMemory.create(1)) {
return quitOtherInstanceRunning();
}
// Great. No other instance is running, so we can run the program.
SyncWindow w;
//w.show();
return a.exec();
}