Esempio n. 1
0
int		print_serv(void)
{
	ft_putstr("---- [Server initialization] ----");
	loading();
	ft_putstr("---- [Loading the PID] ----");
	loading();
	ft_putchar('\n');
	ft_putstr("SERVEUR [ON] - PID : ");
	ft_putnbr(getpid());
	ft_putchar('\n');
	return (0);
}
Esempio n. 2
0
void es::MainGame::LoadData() {
  std::ostringstream out1, out2;
  const auto rand1 = eg::random()(1, 7);
  auto rand2 = eg::random()(1, 7);
  if (rand1 == rand2) { rand2 = (rand1 + 1) % 7 + 1; }
  out1 << "res/save" << rand1 << ".txt";
  out2 << "res/save" << rand2 << ".txt";

  std::ifstream load1(out1.str().c_str());
  if (load1) { loading(load1, false); }

  std::ifstream load2(out2.str().c_str());
  if (load2) { loading(load2, true); }
}
void GoodThumbSource::load(
		Data::FileOrigin origin,
		bool loadFirst,
		bool prior) {
	if (loading() || _empty) {
		return;
	}
	auto callback = [=, guard = _loading.make_guard()](
			QByteArray &&value) mutable {
		if (value.isEmpty()) {
			crl::on_main([=, guard = std::move(guard)]() mutable {
				generate(std::move(guard));
			});
			return;
		}
		crl::async([
			=,
			guard = std::move(guard),
			value = std::move(value)
		]() mutable {
			ready(
				std::move(guard),
				App::readImage(value, nullptr, false),
				value.size());
		});
	};

	Auth().data().cache().get(
		_document->goodThumbnailCacheKey(),
		std::move(callback));
}
Esempio n. 4
0
s32 main(s32 argc, const char* argv[])
{

	atexit(appCleanup);
	deadrsx_init();
	ioPadInit(7);
	sysRegisterCallback(EVENT_SLOT0, eventHandle, NULL);

	u32 *frag_mem = rsxMemAlign(256, 256);
	printf("frag_mem = 0x%08lx\n", (u64) frag_mem);
	realityInstallFragmentProgram_old(context, &nv30_fp, frag_mem);

        loading(); // where all the loading done xD

	long frame = 0; 

	while(1){
                ps3_pad(); // where all are controls are
		waitFlip(); // Wait for the last flip to finish, so we can draw to the old buffer
		drawFrame(currentBuffer, frame++); // Draw into the unused buffer
		flip(currentBuffer); // Flip buffer onto screen
		currentBuffer = !currentBuffer;
		sysCheckCallback();

	}
	
	return 0;
}
Esempio n. 5
0
//---------------------------------------------------------------
void main()
{
   int i,j;
   clrscr();

   for(i=0;i<9;i++)     // flush all the arrays
      for(j=0;j<9;j++)
	 cnt = arr[i][j] = stat[i][j] = puzz[i][j] = hnt[i][j] = 0;

   int gd=DETECT,gm;
   initgraph(&gd, &gm,path);

   if(LOAD)  loading();

   clrscr();
   initgraph(&gd, &gm,path);

   setbkcolor(BLACK);
   rectangle(0,27,637,477);
   setfillstyle(1,BLUE);
   floodfill(25,30,15);
   frame(20,100,90,460,LIGHTRED,RED,GREEN);

   _1.draw();   _4.draw();   _7.draw();
   _2.draw();   _5.draw();   _8.draw();
   _3.draw();   _6.draw();   _9.draw();
   _ER.draw();

   ext_button();
   menubar();
   maze();
   fill_maze();
   Control();
}
Esempio n. 6
0
void SidebarWindow::refresh(bool loggedin) {
    //LOG4CPLUS_DEBUG(LogUtils::getLogger(),
//   "SidebarWindow::refresh current state = " <<
//   friendsView_->getViewState() <<
//   ", new state = " << loggedin <<
//   ", is currently visible = " << RuntimeContext::isSidebarOpened());
    switch (friendsView_->getViewState()) {
    case SidebarHtmlView::VS_LOADING_FRIENDS:
        break;
    case SidebarHtmlView::VS_INITIAL:
    case SidebarHtmlView::VS_WAIT_LOGIN: {
        if (loggedin) {
            loading();
            UserDataObserver::getInstance().getFriends();
        } else {
            loggedOut();
        }
        break;
    }
    case SidebarHtmlView::VS_FRIENDS_LOADED: {
        if (!loggedin) {
            loggedOut();
        }
        break;
    }
    }
}
Esempio n. 7
0
int CUpdator::Init()
{
	//open config of location
	bool open_cfg = m_config->Open(m_configpath);
	Event open_config_error(E_CONFIG_LOAD,(void*)this,(void*)open_cfg,open_cfg);
	Notify(open_config_error);
	if(!open_cfg)
	{
		LOG(_T("autoupdate config open error"));
		DWORD res = 4;
		Event loading(E_UPDATE_OVER,(void*)this,0,res);
		Notify(loading);
		return false;
	}
	//
	m_updatee_path = m_config->GetUpdateePath();
	//check and new the loader
	if (!m_loader)
	{
		tstring base_url = m_config->GetBaseUrl();
		tstring user = m_config->GetUser();
		tstring pwd = m_config->GetPwd();
		m_loader.reset(new Http_Loader(base_url,user,pwd));
	}
	return true;
}
Esempio n. 8
0
QNetworkReply* AccessManager::createRequest(
    Operation op,
    const QNetworkRequest& req,
    QIODevice* data)
{
  if (req.url().scheme() == "hikki") {
    if (req.url().host() == "note") {
      QString path = relativePath(req);
      NotePtr note = m_notebook->open(path);
      if (note->exists()) {
        QNetworkRequest r(note->rendered());
        QNetworkReply* reply =
            QNetworkAccessManager::
              createRequest(op, r, data);
        emit loading(note);
        return reply;
      }
      else {
        emit noSuchNote(note);
      }
    }
    else if (req.url().host() == "data") {
      QString path = KStandardDirs::locate("appdata", relativePath(req));
      kDebug() << "data:" << path;
      if (!path.isEmpty())
      {
        QNetworkRequest r((QUrl(path)));
        return QNetworkAccessManager::createRequest(op, r, data);
      }
    }
  }  
  return QNetworkAccessManager::
      createRequest(op, req, data);
}
Esempio n. 9
0
int CUpdator::Update()
{
	//get local update path
	tstring updatepath = m_config->GetLocalUpdatePath();
	//just remove the files and folders in "update",so use like this 
	updatepath +=_T("\\*");
	//get target path to remove
	tstring targpath = m_config->GetTargetPath();
	//
	BOOL r=TRUE;
	if (m_callBackMoveFile)
	{
		r = Copy_Convertor::Convert(updatepath.c_str(),targpath.c_str(),m_callBackMoveFile);
	}
	else
	{
		r = Copy_Convertor::Convert(updatepath.c_str(),targpath.c_str());
	}

	CString msg;
	msg.Format(_T("update finish:%d"),r);
	LOG(msg);

	//notify l
	DWORD res = r;
	Event loading(E_UPDATE_OVER,(void*)this,0,res);
	Notify(loading);
	return r;
}
Esempio n. 10
0
void AMPWebView::slotLoadStarted()
{
    qDebug( "AMPWebView::slotLoadStarted()" );
    _isLoading=true;
    emit progressMaximum( 100 );
    emit loading( true );
}
isotherm_base::func_t
isotherm_base::get_loading() const
    {
    return [&](real_t T, real_t P) -> real_t
        {
        return loading(T, P);    
        };
    }
Esempio n. 12
0
void AMPWebView::slotLoadFinished( bool )
{
    //PHIAHistoryItem it( url(), title(), icon(), QDateTime::currentDateTime() );
    //_history->addHistoryItem( it );
    _isLoading=false;
    emit loading( false );
    qDebug( "AMPWebView::slotLoadFinished()" );
}
Esempio n. 13
0
HRESULT init()
{
   srand(TIME());
   if(FAILED(loading())) return E_FAIL;
   //if(FAILED()) return E_FAIL;
   //if(FAILED(quad.fullscreen())) return E_FAIL;
   ball.load();
   return S_OK;
}
Esempio n. 14
0
int main(void){
	int w=100;
	int box[6]={100,20,25,25,20,20};
	sortBox(box,6);
	int result[6]={0};
	loading(box,result,w,6);
	outputResult(result,6);
	return 0;
}
Esempio n. 15
0
bool PhotoData::loaded() const {
	bool wasLoading = loading();
	if (full->loaded()) {
		if (wasLoading) {
			Auth().data().notifyPhotoLayoutChanged(this);
		}
		return true;
	}
	return false;
}
Esempio n. 16
0
void ba81NormalQuad::layer::detectTwoTier(Eigen::ArrayBase<T1> &param,
					  Eigen::MatrixBase<T2> &mean, Eigen::MatrixBase<T3> &cov)
{
	if (mean.rows() < 3) return;

	std::vector<int> orthogonal;

	Eigen::Matrix<Eigen::DenseIndex, Eigen::Dynamic, 1>
		numCov((cov.array() != 0.0).matrix().colwise().count());
	std::vector<int> candidate;
	for (int fx=0; fx < numCov.rows(); ++fx) {
		if (numCov(fx) == 1) candidate.push_back(fx);
	}
	if (candidate.size() > 1) {
		std::vector<bool> mask(numItems());
		for (int cx=candidate.size() - 1; cx >= 0; --cx) {
			std::vector<bool> loading(numItems());
			for (int ix=0; ix < numItems(); ++ix) {
				loading[ix] = param(candidate[cx], itemsMap[ix]) != 0;
			}
			std::vector<bool> overlap(loading.size());
			std::transform(loading.begin(), loading.end(),
				       mask.begin(), overlap.begin(),
				       std::logical_and<bool>());
			if (std::find(overlap.begin(), overlap.end(), true) == overlap.end()) {
				std::transform(loading.begin(), loading.end(),
					       mask.begin(), mask.begin(),
					       std::logical_or<bool>());
				orthogonal.push_back(candidate[cx]);
			}
		}
	}
	std::reverse(orthogonal.begin(), orthogonal.end());

	if (orthogonal.size() == 1) orthogonal.clear();
	if (orthogonal.size() && orthogonal[0] != mean.rows() - int(orthogonal.size())) {
		mxThrow("Independent specific factors must be given after general dense factors");
	}

	numSpecific = orthogonal.size();

	if (numSpecific) {
		Sgroup.assign(numItems(), 0);
		for (int ix=0; ix < numItems(); ix++) {
			for (int dx=orthogonal[0]; dx < mean.rows(); ++dx) {
				if (param(dx, itemsMap[ix]) != 0) {
					Sgroup[ix] = dx - orthogonal[0];
					continue;
				}
			}
		}
		//Eigen::Map< Eigen::ArrayXi > foo(Sgroup.data(), param.cols());
		//mxPrintMat("sgroup", foo);
	}
}
Esempio n. 17
0
void ifaGroup::detectTwoTier()
{
	int mlen = maxAbilities;

	if (!twotier || mlen < 3) return;

	std::vector<int> orthogonal;
	if (mlen >= 3) {
		Eigen::Map<Eigen::MatrixXd> Ecov(cov, mlen, mlen);
		Eigen::Matrix<Eigen::DenseIndex, Eigen::Dynamic, 1> numCov((Ecov.array() != 0.0).matrix().colwise().count());
		std::vector<int> candidate;
		for (int fx=0; fx < numCov.rows(); ++fx) {
			if (numCov(fx) == 1) candidate.push_back(fx);
		}
		if (candidate.size() > 1) {
			std::vector<bool> mask(numItems());
			for (int cx=candidate.size() - 1; cx >= 0; --cx) {
				std::vector<bool> loading(numItems());
				for (int ix=0; ix < numItems(); ++ix) {
					loading[ix] = param[ix * paramRows + candidate[cx]] != 0;
				}
				std::vector<bool> overlap(loading.size());
				std::transform(loading.begin(), loading.end(),
					       mask.begin(), overlap.begin(),
					       std::logical_and<bool>());
				if (std::find(overlap.begin(), overlap.end(), true) == overlap.end()) {
					std::transform(loading.begin(), loading.end(),
						       mask.begin(), mask.begin(),
						       std::logical_or<bool>());
					orthogonal.push_back(candidate[cx]);
				}
			}
		}
		std::reverse(orthogonal.begin(), orthogonal.end());
	}
	if (orthogonal.size() == 1) orthogonal.clear();
	if (orthogonal.size() && orthogonal[0] != mlen - int(orthogonal.size())) {
		Rf_error("Independent factors must be given after dense factors");
	}

	numSpecific = orthogonal.size();

	if (numSpecific) {
		Sgroup.assign(numItems(), 0);
		for (int ix=0; ix < numItems(); ix++) {
			for (int dx=orthogonal[0]; dx < maxAbilities; ++dx) {
				if (param[ix * paramRows + dx] != 0) {
					Sgroup[ix] = dx - orthogonal[0];
					continue;
				}
			}
		}
	}
}
Esempio n. 18
0
void main()
{
_setcursortype(_NOCURSOR);
textcolor(7);
clrscr();
snake s;
s.firstscreen();
s.speedselect();
loading();
s.gamescreen();
s.game();
}
Esempio n. 19
0
//----------------------------------------------------------------------------------------
void main()
{
	int k;
	clrscr();
	int gd=DETECT,gm;
	initgraph(&gd,&gm,"C:\\turboc3\\bgi");
	welcome();
	loading();
	k=rand() % 20 + 0;
	if(k>10) {printf("Sorry..! The game could not load"); getch();}
	display_balls(21);
	modes();
}
Esempio n. 20
0
/*!
 * Запрос последних сообщений для всех открытых каналов.
 */
void HistoryChatView::ready()
{
  ChatClientLocker locker;

  foreach (ChatView *view, i()->views()) {
    const QByteArray &id = view->id();
    if (compatible(id) && sync(id, view->lastMessage())) {
      emit loading(SimpleID::encode(id));
    }
  }

  ClientFeeds::request(ChatClient::id(), FEED_METHOD_GET, MESSAGES_FEED_OFFLINE_REQ);
}
Esempio n. 21
0
void ZAudioAdaptor::init(){
    if(instance()){
        connect(instance(), SIGNAL(bookmarkAdded(qint64)),
                this,       SIGNAL(bookmarkAdded(qint64)));
        connect(instance(), SIGNAL(bufferChanged(int)),
                this,       SIGNAL(bufferChanged(int)));
        connect(instance(), SIGNAL(buffering()),
                this,       SIGNAL(buffering()));
        connect(instance(), SIGNAL(durationChanged(qint64)),
                this,       SIGNAL(durationChanged(qint64)));
        connect(instance(), SIGNAL(loading()),
                this,       SIGNAL(loading()));
        connect(instance(), SIGNAL(paused()),
                this,       SIGNAL(paused()));
        connect(instance(), SIGNAL(playing()),
                this,       SIGNAL(playing()));
        connect(instance(), SIGNAL(positionChanged(double)),
                this,       SIGNAL(positionChanged(double)));
        connect(instance(), SIGNAL(queueChanged()),
                this,       SIGNAL(queueChanged()));
        connect(instance(), SIGNAL(queueCleared()),
                this,       SIGNAL(queueCleared()));
        connect(instance(), SIGNAL(queuedSongChanged(int)),
                this,       SIGNAL(queuedSongChanged(int)));
	connect(instance(), SIGNAL(reachedBookmark(qint64)),
                this,       SIGNAL(reachedBookmark(qint64)));
        connect(instance(), SIGNAL(sourceChanged(QString)),
                this,       SIGNAL(sourceChanged(QString)));
        connect(instance(), SIGNAL(stopped()),
                this,       SIGNAL(stopped()));
        connect(instance(), SIGNAL(timeChanged(qint64)),
                this,       SIGNAL(timeChanged(qint64)));
    }

    registerService();
}
Esempio n. 22
0
void FontLoader::loadingDone()
{
    if (loading() || !m_document->haveStylesheetsLoaded())
        return;
    if (!m_loadingDoneEvent && m_callbacks.isEmpty() && m_pendingEvents.isEmpty())
        return;

    if (FrameView* view = m_document->view()) {
        if (view->isInLayout() || view->needsLayout())
            return;
    }

    if (!m_pendingEventsTimer.isActive())
        m_pendingEventsTimer.startOneShot(0);
}
void Playlist::playMediaList(const QList<MediaItem> &mediaList)
{
    //Clear playlist
    clearPlaylist();
    
    //Load playlist with all media items
    //Note: Because playlist loads asynchronously we have to
    //wait for signal from playlist model that loading is 
    //complete (playlistChanged) before starting playback
    // - hence the use of playWhenPlaylistChanges.
    playWhenPlaylistChanges = true;
    m_state = Playlist::Loading;
    emit loading();
    m_currentPlaylist->loadSources(mediaList); 
}
Esempio n. 24
0
int main ()
{
  clrscr();
  loading();
  //getch();
  //psswd_disp();
  //curnt_fn=set_psswd;
  while (!(detect ()==0x2d00 ));//&& (modifiers & ALT))  );//detecting the mose and keyboard action
  hidemouse ();//assiging the flag interrupt for hiding the mouse

  //closing all the files
  fcloseall();
  //cleardevice();
  return 0;
}
int WallpaperImage::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    typedef bb::cascades::ImageView QMocSuperClass;
    _id = QMocSuperClass::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 13)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 13;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QUrl*>(_v) = url(); break;
        case 1: *reinterpret_cast< QString*>(_v) = imageID(); break;
        case 2: *reinterpret_cast< float*>(_v) = loading(); break;
        case 3: *reinterpret_cast< QUrl*>(_v) = defaultImage(); break;
        case 4: *reinterpret_cast< bool*>(_v) = ready(); break;
        }
        _id -= 5;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setUrl(*reinterpret_cast< QUrl*>(_v)); break;
        case 1: setImageID(*reinterpret_cast< QString*>(_v)); break;
        case 2: setLoading(*reinterpret_cast< float*>(_v)); break;
        case 3: setDefaultImage(*reinterpret_cast< QUrl*>(_v)); break;
        case 4: setReady(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 5;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 5;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 5;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Esempio n. 26
0
GraphicEngine::GraphicEngine(GameCore const &core) :
  GraphicCore(core)
{
  _objMod = new AObjModule(*this);
  _map = new MapManager(*_objMod);

  _renderObj = new RendererObject(*this, _map);
  _renderInter = new RendererInterface(*this, _map);
  _renderEnv = new RendererEnv(*this);
  _camera = new Camera(*this);
  _layerPos.w = _cord->get("layer.w");
  _layerPos.h = _cord->get("layer.h");
  loading();
  loadRessource();
  _stp = 0;
}
Esempio n. 27
0
bool CUpdator::CheckVersion(const CVersion &local, const CVersion &remote)
{
	//check
	bool is_new = remote > local;
	if(is_new)
	{
		//should let user to confirm to do or cancel
		if(!m_confirmed)
		{
			//notify
			Event version_checked(E_CHECKED,(void*)this,0,is_new);
			Notify(version_checked);
			return false;
		}
		//new versioninfo 
		CVersionInfo *pvinfo = 0;
		pvinfo = new CVersionInfo(local,remote);
		m_pverinfo.reset(pvinfo);
		//get remote version url
		tstring rm_path = m_config->GetRemoteVerPath();
		//get local version temp path 
		tstring updatepath = m_config->GetLocalUpdatePath();
		//check the end of path for adding the filename in the end
		if (updatepath.length()>0 && updatepath[updatepath.length()-1] !='\\')
		{
			updatepath += _T("\\");
		}
		//download the new version file
		bool r = m_loader->DownLoad(rm_path,updatepath+rm_path);
		//notify l
		Event loading(E_LOAD_VER,(void*)this,0,r);
		Notify(loading);
		if(!r)
		{
			return false;
		}
		pvinfo->SetUpdateVerPath(updatepath+rm_path);
	}
	else
	{
		//notify
		DWORD noNeed = 2;
		Event version_checked(E_UPDATE_OVER,(void*)this,0,noNeed);
		Notify(version_checked);
	}
	return is_new;
}
Esempio n. 28
0
bool CUpdator::DownLoadFile(const pair<tstring,tstring>& src,const tstring &targ)
{
	bool r = m_loader->DownLoad(src.second,targ+src.first);
	//notify l
	struct dfinfo{
		char src[256];
		char tar[256];
		bool result;
	};
	dfinfo df={0};
	SafeStrCpy(df.src, src.second.c_str());
	SafeStrCpy(df.tar, targ.c_str());
	df.result = r;

	Event loading(E_LOADING,0,(void*)&df,sizeof(df));
	Notify(loading);
	return !r;
}
Esempio n. 29
0
TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
    : QSystemTrayIcon( parent )
    , m_currentAnimationFrame( 0 )
    , m_showWindowAction( 0 )
{
    QIcon icon( RESPATH "icons/tomahawk-icon-128x128.png" );
    setIcon( icon );

    refreshToolTip();

    m_contextMenu = new QMenu();
    setContextMenu( m_contextMenu );

    ActionCollection *ac = ActionCollection::instance();
    m_contextMenu->addAction( ac->getAction( "playPause" ) );
    m_contextMenu->addAction( ac->getAction( "stop" ) );
    m_contextMenu->addSeparator();
    m_contextMenu->addAction( ac->getAction( "previousTrack" ) );
    m_contextMenu->addAction( ac->getAction( "nextTrack" ) );
    m_contextMenu->addSeparator();
    m_contextMenu->addAction( ActionCollection::instance()->getAction( "togglePrivacy" ) );

#ifdef Q_WS_MAC
    // On mac you can close the windows while leaving the app open. We then need a way to show the main window again
    m_contextMenu->addSeparator();
    m_showWindowAction = m_contextMenu->addAction( tr( "Hide Tomahawk Window" ) );
    m_showWindowAction->setData( true );
    connect( m_showWindowAction, SIGNAL( triggered() ), this, SLOT( showWindow() ) );
#endif

    m_contextMenu->addSeparator();
    m_contextMenu->addAction( ac->getAction( "quit" ) );

    connect( AudioEngine::instance(), SIGNAL( loading( Tomahawk::result_ptr ) ), SLOT( setResult( Tomahawk::result_ptr ) ) );
    connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( enablePause() ) );
    connect( AudioEngine::instance(), SIGNAL( resumed() ), this, SLOT( enablePause() ) );
    connect( AudioEngine::instance(), SIGNAL( stopped() ), this, SLOT( enablePlay() ) );
    connect( AudioEngine::instance(), SIGNAL( paused() ),  this, SLOT( enablePlay() ) );

    connect( &m_animationTimer, SIGNAL( timeout() ), SLOT( onAnimationTimer() ) );
    connect( this, SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ), SLOT( onActivated( QSystemTrayIcon::ActivationReason ) ) );

    show();
}
Esempio n. 30
0
void ProjectModel::setUrl(const KUrl &poUrl, const KUrl &potUrl)
{
    //kDebug() << "ProjectModel::openUrl("<< poUrl.pathOrUrl() << +", " << potUrl.pathOrUrl() << ")";

    //cleanup old data

    m_dirsWaitingForMetadata.clear();

    if (m_activeJob != NULL)
        m_activeJob->setStatus(-1);
    m_activeJob = NULL;

    if (m_rootNode.rows.count())
    {
        beginRemoveRows(QModelIndex(), 0, m_rootNode.rows.count());

        for (int pos = 0; pos < m_rootNode.rows.count(); pos ++)
            deleteSubtree(m_rootNode.rows.at(pos));
        m_rootNode.rows.clear();
        m_rootNode.poCount = 0;
        m_rootNode.translated = -1;
        m_rootNode.translated_reviewer = -1;
        m_rootNode.translated_approver = -1;
        m_rootNode.untranslated = -1;
        m_rootNode.fuzzy = -1;
        m_rootNode.fuzzy_reviewer = -1;
        m_rootNode.fuzzy_approver = -1;

        endRemoveRows();
    }

    //add trailing slashes to base URLs, needed for potToPo and poToPot
    m_poUrl = poUrl;
    m_potUrl = potUrl;
    m_poUrl.adjustPath(KUrl::AddTrailingSlash);
    m_potUrl.adjustPath(KUrl::AddTrailingSlash);

    emit loading();

    if (!poUrl.isEmpty())
        m_poModel.dirLister()->openUrl(m_poUrl, KDirLister::Reload);
    if (!potUrl.isEmpty())
        m_potModel.dirLister()->openUrl(m_potUrl, KDirLister::Reload);
}